2.10.0 • Published 10 days ago
@teamsparta/react v2.10.0
@teamsparta/react
유틸리티성의 React Component와 Hook들을 제공합니다.
Getting Started
npm install @teamsparta/react # npm
yarn add @teamsparta/react # yarn
pnpm add @teamsparta/react # pnpm
Usage
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>}
/>
When
조건에 따라 컴포넌트를 렌더링합니다.
<When condition={true}>
<div>children</div>
</When>
condition이 true일 경우 children을 렌더링합니다.
<When condition={() => false} fallback={<div>fallback</div>}>
<div>children</div>
</When>
condition이 false일 경우 fallback을 렌더링합니다.
2.10.0
10 days ago
2.9.0
26 days ago
2.8.1
1 month ago
2.8.0
1 month ago
2.9.1
24 days ago
2.8.2
29 days ago
2.7.11
3 months ago
2.7.10
3 months ago
2.7.13
2 months ago
2.7.12
2 months ago
2.7.0
5 months ago
2.6.5
5 months ago
2.6.3
5 months ago
2.6.2
5 months ago
2.6.4
5 months ago
2.6.1
5 months ago
2.6.0
6 months ago
2.5.4
6 months ago
2.4.0
8 months ago
2.5.2
7 months ago
2.5.1
7 months ago
2.3.4
9 months ago
2.3.0
10 months ago
2.1.2
1 year ago
2.2.0
11 months ago
2.3.2
10 months ago
2.3.1
10 months ago
2.3.3
9 months ago
2.1.1
1 year ago
2.1.0
1 year ago
2.0.3
1 year ago
2.0.2
1 year ago
2.0.4
1 year ago
2.0.1
1 year ago
2.0.0
1 year ago
1.0.0
1 year ago