Skip to content

Commit

Permalink
BottomSheet 닫기 버튼 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
baegofda committed Dec 19, 2024
1 parent 97262d2 commit 6c47ba9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/core/components/BottomSheet/BottomSheet.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const Default = (props: BottomSheetProps) => {
target={props.target ?? 'bar'}
isOpen={props.isOpen || isOpen}
onClose={onToggle}
useCloseBtn
useClickOutsideEvent
>
BottomSheet
Expand Down
24 changes: 15 additions & 9 deletions src/core/components/BottomSheet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
BOTTOM_SHEET_ROUNDED_VARIANTS,
BOTTOM_SHEET_ROUNDED_VARIANTS_MAPPER,
} from '@/core/components/BottomSheet/constants';
import IconButton from '@/core/components/Button/IconButton';

const BottomSheet = forwardRef(
(
Expand Down Expand Up @@ -44,15 +45,20 @@ const BottomSheet = forwardRef(
>
<div className={clsx('p-4', className)}>
{useCloseBtn ? (
<div className='mb-4 flex'>
<button
className='ml-auto'
onClick={onClose}
aria-label='창 닫기'
>
{CloseIcon}
</button>
</div>
<IconButton
className={'ml-auto'}
size={'h-24'}
backgroundColor={'gray-02'}
onClick={onClose}
aria-label='창 닫기'
icon={
<Icon
className={'text-[0.8125rem] text-gray-07'}
iconKey={'x'}
weight={'bold'}
/>
}
/>
) : null}
{children}
</div>
Expand Down

0 comments on commit 6c47ba9

Please sign in to comment.