From 5e1caf8eb5f999b498ddf9c450a9bc1243ec9a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EC=83=81=ED=98=84?= Date: Mon, 19 Dec 2022 14:02:41 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20modal=20=EB=A7=A4=EA=B0=9C=EB=B3=80?= =?UTF-8?q?=EC=88=98=20=EC=B6=94=EA=B0=80=20(#16)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: changeLog 추가 * chore: modify template * input 매개변수 및 마진 값 수정 (#12) * (#11) refactor: setState -> onChange로 변경 * (#11) fix: margin left 6px 추가 * (#14) feat: modal 매개변수로 children 추가 (#15) --- src/components/modal/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/modal/index.tsx b/src/components/modal/index.tsx index 70e8889..188c3ed 100644 --- a/src/components/modal/index.tsx +++ b/src/components/modal/index.tsx @@ -1,3 +1,4 @@ +import { ReactNode } from 'react'; import OutsideClickHandler from 'react-outside-click-handler'; import styled from 'styled-components'; import { Close } from '../styleGuide/icon/Close'; @@ -8,6 +9,7 @@ interface propsType extends headerPropsType, contentPropsType { inputList?: JSX.Element[]; buttonList: JSX.Element[]; close: () => void; + children: ReactNode; } export const Modal = ({ @@ -16,6 +18,7 @@ export const Modal = ({ inputList, buttonList, close, + children, }: propsType) => { return ( <_Background> @@ -27,6 +30,7 @@ export const Modal = ({
{content && } <_InputWrapper>{inputList?.map((input) => input)} + {children} <_BtnWrapper>{buttonList.map((Btn) => Btn)}