From 994a98de9ed03941131122da024850a7e5db7f28 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Thu, 17 Aug 2023 12:41:31 +0800 Subject: [PATCH] Add icon support to action sheet --- .../src/components/molecules/Dropdown/ActionSheet.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/src/components/molecules/Dropdown/ActionSheet.tsx b/components/src/components/molecules/Dropdown/ActionSheet.tsx index af142880..fc3959f9 100644 --- a/components/src/components/molecules/Dropdown/ActionSheet.tsx +++ b/components/src/components/molecules/Dropdown/ActionSheet.tsx @@ -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; @@ -75,6 +79,7 @@ export const ActionSheet = React.forwardRef( return DropdownChild({ item, setIsOpen }) } + const icon = (item as DropdownItemObject).icon return ( ( setIsOpen(false) }} > + {icon} {(item as DropdownItemObject).label} )