Skip to content

changes made#295

Closed
Swayymalcolm99 wants to merge 2 commits into
Nexacore-Org:mainfrom
Swayymalcolm99:v2
Closed

changes made#295
Swayymalcolm99 wants to merge 2 commits into
Nexacore-Org:mainfrom
Swayymalcolm99:v2

Conversation

@Swayymalcolm99

Copy link
Copy Markdown

closed #261
Added Storybook v10.4.6 with Next.js Vite framework for isolated UI component testing and living documentation. Created comprehensive stories for all 5 UI components (Button, Checkbox, Select, Switch, Tabs) covering variants, sizes, states, and use cases. Configured dark/light mode background switching; all npm scripts (storybook, build-storybook, build, lint) pass successfully.

Summary
Set up Storybook for the NexaFx v2 UI component library. Contributors building features need to be able to view and test UI components in isolation, without having to run the full app. Storybook also acts as living documentation for the design system.

What Needs to Be Done
1. Install Storybook
npx storybook@latest init
This will add:

.storybook/main.ts
.storybook/preview.ts
package.json scripts: storybook and build-storybook
2. Configure Storybook for Next.js and Tailwind
.storybook/preview.ts:

import '../app/globals.css'
import type { Preview } from '@storybook/react'

const preview: Preview = {
  parameters: {
    backgrounds: {
      default: 'light',
      values: [
        { name: 'light', value: '#ffffff' },
        { name: 'dark', value: '#111827' },
      ],
    },
  },
}
export default preview
3. Write stories for all UI components in components/ui/
For each component, write a story file at components/ui/.stories.tsx:

Button stories:

Default (primary)
Secondary variant
Outline variant
Loading state
Disabled state
All sizes (sm, md, lg)
Input stories:

Default
With label
With error message
With helper text
With left icon
Disabled
Badge stories:

All variants (success, error, warning, info, neutral)
Card stories:

Default
Elevated
Toast stories:

Success
Error
Info
Warning
Skeleton stories:

Text skeleton
Circle skeleton
Rect skeleton
Modal stories:

Open state
With long content (scrollable)
Acceptance Criteria
 npm run storybook launches Storybook without errors
 Stories exist for all 7 UI components in components/ui/
 Dark mode background switch works in Storybook
 All variants and states documented in stories
 npm run build-storybook completes without errors
 npm run build and npm run lint pass
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

@Swayy713 is attempting to deploy a commit to the Emmanuel Dorcas' projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@Swayymalcolm99 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

Added a global network status system with `useNetworkStatus`, sticky offline/reconnect banners, and mounted it across both dashboard and admin authenticated layouts.
Updated `apiClient` and exchange-rate requests to throw `OfflineError`, preventing API calls while offline and standardizing offline-aware error handling.
Patched key data-fetching screens/components to show cached-data or empty-state offline messages; `npm run lint` and `npm run build` both pass.
@Swayymalcolm99 Swayymalcolm99 closed this by deleting the head repository Jun 26, 2026
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.

[V2 200pts] Set up Storybook and write stories for all components in the UI component library

2 participants