Skip to content

Commit

Permalink
chore: address comments from review
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdavies73 committed Nov 28, 2024
1 parent a95b78a commit 0621841
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { useDrop, useDrag } from "react-dnd";
import { PaddingProps } from "styled-system";

import { filterStyledSystemPaddingProps } from "../../../style/utils";
import { StyledDraggableItem, StyledIcon } from "./draggable-item.style";
import { StyledDraggableItem } from "./draggable-item.style";
import Icon from "../../icon";

export interface DraggableItemProps extends PaddingProps {
/**
Expand Down Expand Up @@ -98,7 +99,7 @@ const DraggableItem = ({
{...paddingProps}
>
{children}
<StyledIcon type="drag" />
<Icon type="drag" />
</StyledDraggableItem>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import styled from "styled-components";
import { padding, margin, PaddingProps } from "styled-system";

import { baseTheme } from "../../../style/themes";
import Icon from "../../icon";

const StyledDraggableContainer = styled.div`
${margin}
Expand All @@ -24,8 +23,6 @@ const StyledDraggableItem = styled.div<StyledDraggableItemProps>`
opacity: ${({ isDragging }) => (isDragging ? "0" : "1")};
`;

const StyledIcon = styled(Icon)``;

StyledDraggableContainer.defaultProps = {
theme: baseTheme,
};
Expand All @@ -34,4 +31,4 @@ StyledDraggableItem.defaultProps = {
theme: baseTheme,
};

export { StyledDraggableContainer, StyledDraggableItem, StyledIcon };
export { StyledDraggableContainer, StyledDraggableItem };
8 changes: 4 additions & 4 deletions src/components/draggable/draggable.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ DefaultStory.storyName = "Default";
export const FlexDirectionStory: Story = () => (
<DraggableContainer flexDirection="row-reverse">
<DraggableItem key="1" id={1}>
Some content goes here
Some first content goes here
</DraggableItem>
<DraggableItem key="2" id={2}>
Some content goes here
Some second content goes here
</DraggableItem>
<DraggableItem key="3" id={3}>
Some content goes here
Some third content goes here
</DraggableItem>
<DraggableItem key="4" id={4}>
Some content goes here
Some fourth content goes here
</DraggableItem>
</DraggableContainer>
);
Expand Down

0 comments on commit 0621841

Please sign in to comment.