This commit is contained in:
Untone 2024-09-15 19:41:05 +03:00
commit 512c65aeef
4 changed files with 13000 additions and 332 deletions

13291
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -46,9 +46,12 @@
"@storybook/addon-essentials": "^8.2.9",
"@storybook/addon-interactions": "^8.2.9",
"@storybook/addon-links": "^8.2.9",
"@storybook/addon-styling": "1.3.7",
"@storybook/addon-themes": "^8.2.9",
"@storybook/addon-viewport": "^8.2.9",
"@storybook/blocks": "^8.2.9",
"@storybook/builder-vite": "8.2.9",
"@storybook/docs-tools": "8.2.9",
"@storybook/html": "^8.2.9",
"@storybook/react": "^8.2.9",
"@storybook/test-runner": "^0.19.1",

View File

@ -1,15 +1,43 @@
// src/components/atoms/Button/Button.stories.tsx
import type { Meta } from '@storybook/html'
// import type { Meta, StoryObj } from '@storybook/html'
import { Meta, StoryObj } from 'storybook-solidjs'
import { Button } from './Button'
import './Button.module.scss'
// Примените корректную типизацию для Storybook
const meta: Meta<typeof Button> = {
title: 'Atoms/Button',
title: 'Atom/Button',
component: Button,
argTypes: {
label: { control: 'text' },
primary: { control: 'boolean' },
value: { control: 'text' },
variant: {
options: ['primary', 'secondary', 'bordered', 'inline', 'light', 'outline', 'danger'],
control: { type: 'select' }
},
size: {
options: ['S', 'M', 'L'],
control: { type: 'radio' }
},
loading: { control: 'boolean' },
disabled: { control: 'boolean' },
isSubscribeButton: { control: 'boolean' },
onClick: { action: 'clicked' }
}
}
export default meta
type Story = StoryObj<typeof Button>
export const Default: Story = {
args: {
value: 'Button',
variant: 'primary',
size: 'M',
loading: false,
disabled: false,
isSubscribeButton: false
}
}