Merge branch 'dev' of https://github.com/Discours/discoursio-webapp into dev
This commit is contained in:
commit
512c65aeef
13291
package-lock.json
generated
13291
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -46,9 +46,12 @@
|
||||||
"@storybook/addon-essentials": "^8.2.9",
|
"@storybook/addon-essentials": "^8.2.9",
|
||||||
"@storybook/addon-interactions": "^8.2.9",
|
"@storybook/addon-interactions": "^8.2.9",
|
||||||
"@storybook/addon-links": "^8.2.9",
|
"@storybook/addon-links": "^8.2.9",
|
||||||
|
"@storybook/addon-styling": "1.3.7",
|
||||||
"@storybook/addon-themes": "^8.2.9",
|
"@storybook/addon-themes": "^8.2.9",
|
||||||
"@storybook/addon-viewport": "^8.2.9",
|
"@storybook/addon-viewport": "^8.2.9",
|
||||||
"@storybook/blocks": "^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/html": "^8.2.9",
|
||||||
"@storybook/react": "^8.2.9",
|
"@storybook/react": "^8.2.9",
|
||||||
"@storybook/test-runner": "^0.19.1",
|
"@storybook/test-runner": "^0.19.1",
|
||||||
|
|
|
@ -1,15 +1,43 @@
|
||||||
// src/components/atoms/Button/Button.stories.tsx
|
// 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 } from './Button'
|
||||||
|
import './Button.module.scss'
|
||||||
|
|
||||||
// Примените корректную типизацию для Storybook
|
// Примените корректную типизацию для Storybook
|
||||||
const meta: Meta<typeof Button> = {
|
const meta: Meta<typeof Button> = {
|
||||||
title: 'Atoms/Button',
|
title: 'Atom/Button',
|
||||||
|
component: Button,
|
||||||
|
|
||||||
argTypes: {
|
argTypes: {
|
||||||
label: { control: 'text' },
|
value: { control: 'text' },
|
||||||
primary: { control: 'boolean' },
|
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' }
|
onClick: { action: 'clicked' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default meta
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user