v1.2.0
npm i @uiw/react-only-when@1.2.0
- 🌍 website: update website code preview. 716292d @jaywcjlove
- 💄 chore: update workflows config. 8488a56 @jaywcjlove
- 💄 chore: update workflows config. ed9c7ad @jaywcjlove
- 🌟 feat: add Switch component. 2d4ad56 @jaywcjlove
- 🌟 feat: className/hiddenMode add default value. 1646906 @jaywcjlove
- 📖 doc: Update README.md 28c851d @jaywcjlove
<Switch />
import { Switch, Case, Default } from '@uiw/react-only-when/switch'
<Switch>
<Case condition={age < 6}>preschool</Case>
<Case condition={age >= 6}>primary school</Case>
<Default>you graduated</Default>
</Switch>