Storybook update
This commit is contained in:
parent
d003df96f2
commit
e4a1679052
9669
package-lock.json
generated
9669
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -49,6 +49,8 @@
|
||||||
"@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",
|
||||||
|
@ -139,7 +141,11 @@
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 20"
|
"node": ">= 20"
|
||||||
},
|
},
|
||||||
"trustedDependencies": ["@biomejs/biome", "esbuild", "protobufjs"],
|
"trustedDependencies": [
|
||||||
|
"@biomejs/biome",
|
||||||
|
"esbuild",
|
||||||
|
"protobufjs"
|
||||||
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.0",
|
||||||
"idb": "^8.0.0",
|
"idb": "^8.0.0",
|
||||||
|
|
|
@ -1,15 +1,45 @@
|
||||||
// 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 { Button } from './Button'
|
|
||||||
|
import { Meta, StoryObj} from "storybook-solidjs";
|
||||||
|
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