storybook
Storybook 7.0.20
專案
官方
# Clone the template
npx degit chromaui/intro-storybook-react-template taskbox
# Install dependencies
yarn
網路教學用vite起
npm create vite@latest 你的專案名稱 -- --template react && npm install
安裝
生成檔案與指令
detail
啟動
範例
用js寫的範例
用tsx寫的範例
較新的寫法 tsx
優點
進階設定
自訂control中下拉選項 argTypes
設定decorators
設定初始設定
設定docs區域
Last updated