Skip to content

Commit

Permalink
Add icon support to action sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
storywithoutend committed Aug 17, 2023
1 parent ee5c067 commit 994a98d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/src/components/molecules/Dropdown/ActionSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ const ActionSheetOptions = styled.div(

const ActionSheetItem = styled.div(
({ theme }) => css`
display: flex;
justify-content: center;
align-items: center;
gap: ${theme.space['2']};
width: 100%;
padding: 20px;
position: relative;
Expand Down Expand Up @@ -75,6 +79,7 @@ export const ActionSheet = React.forwardRef<HTMLDivElement, Props>(
return DropdownChild({ item, setIsOpen })
}

const icon = (item as DropdownItemObject).icon
return (
<ActionSheetItem
key={(item as DropdownItemObject).label}
Expand All @@ -85,6 +90,7 @@ export const ActionSheet = React.forwardRef<HTMLDivElement, Props>(
setIsOpen(false)
}}
>
{icon}
<Typography>{(item as DropdownItemObject).label}</Typography>
</ActionSheetItem>
)
Expand Down

0 comments on commit 994a98d

Please sign in to comment.