Skip to content

feat(sdk): Storybook for React components, deployed to GitHub Pages (#357)#362

Open
Ipramking wants to merge 1 commit into
Miracle656:mainfrom
Ipramking:feat/357-storybook
Open

feat(sdk): Storybook for React components, deployed to GitHub Pages (#357)#362
Ipramking wants to merge 1 commit into
Miracle656:mainfrom
Ipramking:feat/357-storybook

Conversation

@Ipramking

Copy link
Copy Markdown
Contributor

Summary

Implements #357 — Storybook for SDK components: a Storybook for the React components in sdk/react/, deployed to GitHub Pages.

sdk/react/ previously exported only hooks + a provider (no visual components), so this adds presentational components for each hook and stories for them.

What changed

  • sdk/react/src/components/ — five presentational components, exported from invisible-wallet-sdk/react. Each pairs with a hook (its JSDoc shows the exact wiring):
    Component Pairs with
    AccountBadge useAccount
    BalanceCard useBalance
    SendPaymentForm useSendPayment
    TxStatusPill useTransactionStatus
    ConnectButton VeilProvider wallet
  • Storybook (sdk/react/.storybook/, @storybook/react-vite) with a *.stories.tsx per component covering default / loading / error / empty states.
  • .github/workflows/storybook.yml — builds Storybook on PRs and deploys it to GitHub Pages on main (base: './' for the Pages subpath).
  • sdk/package.json gets storybook / build-storybook scripts + devDeps (lockfile updated); sdk/tsconfig.json excludes stories + .storybook so the published tsc build and size budget are unchanged.

Acceptance criteria

Verification

  • npx tsc --noEmit (SDK) — clean (components compile; stories excluded).
  • npm run build-storybooksucceeds (Vite build, all stories compiled, static output in react/storybook-static).

Note for the maintainer: the live URL goes live once GitHub Pages is enabled (Settings → Pages → Source: GitHub Actions) and this lands on main. The Pages deploy step only runs on main; PRs just build Storybook to catch breakage. (As with other fork PRs, the workflow needs a maintainer's approval to run.)

Closes #357

Add presentational React components for the SDK hooks and a Storybook that
documents them, deployed to GitHub Pages.

- sdk/react/src/components: AccountBadge, BalanceCard, SendPaymentForm,
  TxStatusPill, ConnectButton -- presentational components paired with
  useAccount / useBalance / useSendPayment / useTransactionStatus and the
  provider wallet. Exported from invisible-wallet-sdk/react.
- Storybook (sdk/react/.storybook) with stories for every component (default,
  loading, error and other states).
- .github/workflows/storybook.yml builds Storybook on PRs and deploys it to
  GitHub Pages on main.
- Stories and .storybook are excluded from the published tsc build, so the SDK
  bundle and size budget are unchanged.

Live Storybook: https://miracle656.github.io/veil/ (after Pages is enabled).

Closes Miracle656#357
@Ipramking Ipramking requested a review from Miracle656 as a code owner June 27, 2026 16:46
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Ipramking is attempting to deploy a commit to the miracle656's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Ipramking Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Storybook for SDK components

1 participant