feat: add Storybook with component stories
Installs @storybook/nextjs-vite. Stories co-located with components, grouped by layer (Shared/Entities/Widgets). Multi-variant cases use render functions instead of one story per variant/size.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
|
||||
import { MobileNav } from './MobileNav'
|
||||
|
||||
// MobileNav is lg:hidden — it renders only on mobile viewports.
|
||||
// Use the viewport toolbar in Storybook to switch to a mobile size to see it.
|
||||
const meta: Meta<typeof MobileNav> = {
|
||||
title: 'Widgets/MobileNav',
|
||||
component: MobileNav,
|
||||
parameters: {
|
||||
viewport: {
|
||||
defaultViewport: 'mobile1',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export default meta
|
||||
|
||||
type Story = StoryObj<typeof MobileNav>
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
items: [
|
||||
{ id: 'bio', label: 'Bio', number: '01' },
|
||||
{ id: 'work', label: 'Work', number: '02' },
|
||||
{ id: 'contact', label: 'Contact', number: '03' },
|
||||
],
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user