Skip to content

Commit

Permalink
[#355] DrawerProps 리팩터링 (#356)
Browse files Browse the repository at this point in the history
* refactor: PropsWithChildren 제네릭을 통해 타입을 확장하도록 수정
  • Loading branch information
minjongbaek authored Jul 9, 2023
1 parent b362bcb commit f4fcfad
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/ui/common/BottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ import { useEffect } from 'react';
import IconButton from '@/ui/common/IconButton';
import type { PropsWithChildren } from 'react';

interface DrawerProps extends PropsWithChildren {
interface DrawerProps {
isOpen: boolean;
onClose: () => void;
onCancel?: () => void;
}

const Drawer = ({ isOpen, onClose, onCancel, children }: DrawerProps) => {
const Drawer = ({
isOpen,
onClose,
onCancel,
children,
}: PropsWithChildren<DrawerProps>) => {
const handleClickOverlay = () => {
onCancel && onCancel();
onClose();
Expand Down

1 comment on commit f4fcfad

@vercel
Copy link

@vercel vercel bot commented on f4fcfad Jul 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.