Skip to content

Commit

Permalink
feat : 스토리북 ui 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
ujinsim committed Feb 1, 2025
1 parent 88f9741 commit 94915c8
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions src/shared/ui/Modal/Modal.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const Basic: StoryObj<typeof Modal> = {
isOpen: false,
},
render: (args) => {
const [isOpen, setIsOpen] = useState(args.isOpen); // args를 상태로 활용
const [isOpen, setIsOpen] = useState(args.isOpen);

const openModal = () => setIsOpen(true);
const closeModal = () => setIsOpen(false);
Expand All @@ -50,12 +50,21 @@ export const Basic: StoryObj<typeof Modal> = {
<Modal {...args} isOpen={isOpen} closeModal={closeModal}>
<div className="flex flex-col items-center gap-4 rounded-lg bg-white p-6 shadow-sm">
<div className="p-2 text-2xl font-semibold">ddingdong 모달입니다.</div>
<button
onClick={closeModal}
className="rounded-md bg-red-200 px-4 py-2 font-semibold text-white"
>
모달 닫기
</button>

<div className="flex gap-3">
<button
onClick={closeModal}
className="rounded-md bg-gray-100 px-4 py-2 font-semibold text-black hover:bg-gray-200"
>
취소
</button>
<button
onClick={closeModal}
className="rounded-md bg-red-200 px-4 py-2 font-semibold text-white hover:bg-red-300"
>
확인하기
</button>
</div>
</div>
</Modal>
</div>
Expand Down

0 comments on commit 94915c8

Please sign in to comment.