유틸리티성의 React Component와 Hook들을 제공합니다.
npm install @teamsparta/react유틸리티성의 React Component와 Hook들을 제공합니다.
``bash`
npm install @teamsparta/react # npm
yarn add @teamsparta/react # yarn
pnpm add @teamsparta/react # pnpm
cases에서 value에 해당하는 컴포넌트를 렌더링합니다. 만약 존재하지 않는 case일 경우 defaultComponent를 렌더링합니다.
`tsx`
cases={{
'red':
'green':
}}
defaultComponent={
/>
조건에 따라 컴포넌트를 렌더링합니다.
`tsx`
children
condition이 true일 경우 children을 렌더링합니다.
`tsx``fallback}>
children
condition이 false일 경우 fallback을 렌더링합니다.