File size: 1,388 Bytes
41a71fd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
import type { Meta, StoryObj } from '@storybook/react';
import { Button, ButtonSize, ButtonTheme } from './Button';
import Location from '@/shared/assets/icons/location.svg?react';
import UserIcon from '@/shared/assets/icons/user.svg?react';
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
const meta = {
title: 'Shared/Button',
component: Button,
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
// More on argTypes: https://storybook.js.org/docs/api/argtypes
// argTypes: {
// backgroundColor: { control: 'color' },
// },
} satisfies Meta<typeof Button>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Primary: Story = {
args: {
theme: ButtonTheme.PRIMARY,
children: 'Нажми меня',
size: ButtonSize.XL,
},
};
export const PrimaryWithIcon: Story = {
args: {
theme: ButtonTheme.PRIMARY,
children: 'Нажми меня',
size: ButtonSize.XL,
icon: <UserIcon />,
},
};
export const Navigation: Story = {
args: {
theme: ButtonTheme.NAVIGATION,
children: 'Нажми меня',
},
};
export const NavigationIcon: Story = {
args: {
theme: ButtonTheme.NAVIGATION,
children: 'Нажми меня',
icon: <Location />,
},
};
|