[React] 합성 컴포넌트로 재사용성 높인 Modal 컴포넌트 & 스토리북 작성법
Modal 컴포넌트 완성본 스토리북 보러 가기
🔴 기존 컴포넌트의 문제점
YEONSUI 버전 1에서 만든 Modal 컴포넌트는 Modal이라는 컴포넌트 하나 안에서 props만으로 기능 유무를 결정한다.
return (
<Modal
title="Are you sure delete this task?"
icon="warning"
onClose={() => {}}
isOpen
labelClose="No"
...
yeonsu.hashnode.dev4 min read