@teamsparta/react
TypeScript icon, indicating that this package has built-in type declarations

2.1.2 • Public • Published

React

유틸리티성의 React Component와 Hook들을 제공합니다.

Getting Started

npm install @teamsparta/react       # npm
yarn add @teamsparta/react          # yarn
pnpm add @teamsparta/react          # pnpm

Usage

components

  • SwitchCase

cases에서 value에 해당하는 컴포넌트를 렌더링합니다. 만약 존재하지 않는 case일 경우 defaultComponent를 렌더링합니다.

<SwitchCase 
  value={color}
  cases={{
    'red': <Category color='red'>Dangerous</Category>
    'green': <Category color='green'>Safe</Category>
  }}
  defaultComponent={<Category color='blue'>Just</Category>}
/>

Readme

Keywords

none

Package Sidebar

Install

npm i @teamsparta/react

Weekly Downloads

175

Version

2.1.2

License

MIT

Unpacked Size

23.7 kB

Total Files

37

Last publish

Collaborators

  • jung-eun
  • junan
  • jihee_park
  • dongheelee
  • sparta-sj
  • ganguklee
  • js.byeon
  • mj.jung
  • heo-wonyoung
  • eonthespartan
  • santoryu
  • seongtaek
  • jhyeon-kim
  • spartaheonil
  • hyunwooo
  • kimseunghwan
  • dh.lee
  • mk.kang
  • bknam-teamsparta