2.10.0 • Published 2 months ago

@teamsparta/react v2.10.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

@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

2 months ago

2.9.0

3 months ago

2.8.1

3 months ago

2.8.0

3 months ago

2.9.1

3 months ago

2.8.2

3 months ago

2.7.11

4 months ago

2.7.10

5 months ago

2.7.13

4 months ago

2.7.12

4 months ago

2.7.0

6 months ago

2.6.5

7 months ago

2.6.3

7 months ago

2.6.2

7 months ago

2.6.4

7 months ago

2.6.1

7 months ago

2.6.0

7 months ago

2.5.4

7 months ago

2.4.0

9 months ago

2.5.2

9 months ago

2.5.1

9 months ago

2.3.4

11 months ago

2.3.0

1 year ago

2.1.2

1 year ago

2.2.0

1 year ago

2.3.2

11 months ago

2.3.1

12 months ago

2.3.3

11 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