Skip to content

feat: add Storybook to document React components#10

Merged
Gnuk merged 1 commit into
mainfrom
9-add-storybook-to-document-react-components
Jun 12, 2026
Merged

feat: add Storybook to document React components#10
Gnuk merged 1 commit into
mainfrom
9-add-storybook-to-document-react-components

Conversation

@Gnuk

@Gnuk Gnuk commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

What

Documents the 14 exported React components with Storybook 10 (@storybook/react-vite).

  • One CSF3 story file per component under react/stories/ (Button, Badge, Card, ButtonCard, Container, Grid, HSpace, VSpace, Icon, Ion, ImportFile, Meter, Progress, Text, Title).
  • .storybook/preview.ts loads the built @ippon-ui/styles stylesheet (fonts + icons + tikui.css) so stories render with real styling; autodocs enabled globally.

Tooling

  • react package scripts now drive Storybook:
    • dev → Storybook serve on port 4230
    • buildbuild:lib (published library, unchanged) then build:storybook (static Storybook)
  • Exposed via mise: mise react-dev and mise react-build.
  • Because pnpm build now chains the Storybook build, CI validates that Storybook compiles via the existing build step (no separate CI step, no deployment).

Notes

  • Stories live outside src/ so the published library bundle, its .d.ts, and Vitest coverage stay scoped to src.
  • Type-checking of stories is wired through react/tsconfig.storybook.json (not referenced by the lib build).
  • storybook-static/ added to .gitignore / .prettierignore.

Verified: mise react-build, mise react-lint, stories tsc typecheck, mise format-ci, mise test-unit-ci (210 react + 4 styles tests) all green.

Closes #9

🤖 Generated with Claude Code

Comment thread react/stories/IpponIcon.stories.tsx
Comment thread react/stories/IpponMeter.stories.tsx
Comment thread react/stories/IpponProgress.stories.tsx
Comment thread react/stories/IpponButtonCard.stories.tsx
Comment thread react/stories/IpponCard.stories.tsx
Comment thread react/stories/IpponContainer.stories.tsx
Comment thread react/stories/IpponGrid.stories.tsx
Comment thread react/stories/IpponHSpace.stories.tsx
Comment thread react/stories/IpponVSpace.stories.tsx
@Gnuk Gnuk force-pushed the 9-add-storybook-to-document-react-components branch from b5baf14 to 7c18ab9 Compare June 12, 2026 09:55
Document the 14 exported React components with Storybook 10 (react-vite),
one CSF3 story file per component under react/stories/. Stories render
against the built @ippon-ui/styles stylesheet loaded in the preview.

The react package dev/build scripts now drive Storybook: dev serves it on
port 4230, build chains the library build (build:lib) then the static
Storybook (build:storybook). Exposed via mise tasks react-dev / react-build.

Closes #9

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Gnuk Gnuk force-pushed the 9-add-storybook-to-document-react-components branch from 7c18ab9 to 84b82f5 Compare June 12, 2026 10:02
@Gnuk Gnuk marked this pull request as ready for review June 12, 2026 10:05
@Gnuk Gnuk merged commit e192477 into main Jun 12, 2026
3 checks passed
@Gnuk Gnuk deleted the 9-add-storybook-to-document-react-components branch June 12, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add storybook to document react components

1 participant