Skip to content

Commit

Permalink
feat: modal 매개변수 추가 (#16)
Browse files Browse the repository at this point in the history
* chore: changeLog 추가

* chore: modify template

* input 매개변수 및 마진 값 수정 (#12)

* (#11) refactor: setState -> onChange로 변경

* (#11) fix: margin left 6px 추가

* (#14) feat: modal 매개변수로 children 추가 (#15)
  • Loading branch information
조상현 authored Dec 19, 2022
1 parent 403ce01 commit 5e1caf8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/modal/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -8,6 +9,7 @@ interface propsType extends headerPropsType, contentPropsType {
inputList?: JSX.Element[];
buttonList: JSX.Element[];
close: () => void;
children: ReactNode;
}

export const Modal = ({
Expand All @@ -16,6 +18,7 @@ export const Modal = ({
inputList,
buttonList,
close,
children,
}: propsType) => {
return (
<_Background>
Expand All @@ -27,6 +30,7 @@ export const Modal = ({
<Header title={title} />
{content && <Content content={content} />}
<_InputWrapper>{inputList?.map((input) => input)}</_InputWrapper>
{children}
<_BtnWrapper>{buttonList.map((Btn) => Btn)}</_BtnWrapper>
</_Modal>
</OutsideClickHandler>
Expand Down

0 comments on commit 5e1caf8

Please sign in to comment.