diff --git a/src/components/input/Label.tsx b/src/components/input/Label.tsx index 295253a..7bef8e0 100644 --- a/src/components/input/Label.tsx +++ b/src/components/input/Label.tsx @@ -1,7 +1,7 @@ import { Text } from '../styleGuide/text/Text'; export interface labelPropsType { - label: string; + label?: string; } export const Label = ({ label }: labelPropsType) => { diff --git a/src/components/modal/index.tsx b/src/components/modal/index.tsx index 188c3ed..e12d50d 100644 --- a/src/components/modal/index.tsx +++ b/src/components/modal/index.tsx @@ -9,7 +9,7 @@ interface propsType extends headerPropsType, contentPropsType { inputList?: JSX.Element[]; buttonList: JSX.Element[]; close: () => void; - children: ReactNode; + children?: ReactNode; } export const Modal = ({ diff --git a/src/components/search/index.tsx b/src/components/search/index.tsx index a8a71ac..1ecca43 100644 --- a/src/components/search/index.tsx +++ b/src/components/search/index.tsx @@ -1,29 +1,25 @@ import styled, { css } from 'styled-components'; import { Search } from '../styleGuide/icon/Search'; -import { Dispatch, SetStateAction } from 'react'; +import { ChangeEvent } from 'react'; import { marginCssType, marginToCss } from '../../utils/distance'; interface PropsType extends marginCssType { className?: string; value: string; - setState: Dispatch>; + onChange: (e: ChangeEvent) => void; disabled?: boolean; } export const SearchBox = ({ className, value, - setState, + onChange, disabled, }: PropsType) => { return ( <_Wrapper className={className} disabled={disabled}> - <_Input - value={value} - onChange={(e) => setState(e.target.value)} - disabled={disabled} - /> + <_Input value={value} onChange={onChange} disabled={disabled} /> ); }; diff --git a/src/index.ts b/src/index.ts index 22aab68..2f523ec 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ export * from './components/button/Button'; -export * from './components/checkBox'; +export * as CheckBox from './components/checkBox'; export * from './components/dropdown'; export * from './components/input'; export * from './components/radio/Radio';