Newer
Older
import type { Meta, StoryObj } from '@storybook/vue3';
import SelectButton from './SelectButton.vue';
const meta: Meta = {
title: 'Components/SelectButton',
component: SelectButton,
tags: ['autodocs'],
parameters: {
docs: {
description: {
component: 'A component that is used to select a value from a list using a button.',
},
},
},
argTypes: {
options: {
control: 'object',
size: { control: 'select', options: ['small', 'normal', 'large', 'huge'] },
rounded: { control: 'boolean' },
Дмитрий Малюгин
committed
darknessTheme: { control: 'select', options: ['100', '200', '300', '400', '500', '600', '700', '800', '900'] },
darknessTextColor: { control: 'select', options: ['100', '200', '300', '400', '500', '600', '700', '800', '900'] },
darknessActiveBackgroundColor: {
control: 'select',
Дмитрий Малюгин
committed
options: ['100', '200', '300', '400', '500', '600', '700', '800', '900'],
Дмитрий Малюгин
committed
theme: {
control: 'select',
Дмитрий Малюгин
committed
options: [
'white',
'blue',
'sky',
'cyan',
'teal',
'green',
'yellow',
'orange',
'pink',
'fuchsia',
'purple',
'indigo',
'rose',
'red',
'black',
],
Дмитрий Малюгин
committed
textColor: {
control: 'select',
options: [
'white',
'blue',
'sky',
'cyan',
'teal',
'green',
'yellow',
'orange',
'pink',
'fuchsia',
'purple',
'indigo',
'rose',
'red',
'black',
],
},
control: 'select',
options: [
'white',
'blue',
'sky',
'cyan',
'teal',
'green',
'yellow',
'orange',
'pink',
'fuchsia',
'purple',
'indigo',
'rose',
'red',
'black',
],
},
border: {
control: 'select',
options: [
'white',
'blue',
'sky',
'cyan',
'teal',
'green',
'yellow',
'orange',
'pink',
'fuchsia',
'purple',
'indigo',
'rose',
'red',
'black',
],
},
disabled: { control: 'boolean' },
},
args: {},
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
export default meta;
type Story = StoryObj<typeof meta>;
export const Primary: Story = {
args: {
options: [
{
label: 'First',
},
{
label: 'Second',
},
],
rounded: false,
disabled: false,
},
};
export const LargeFull: Story = {
args: {
options: [
{
label: 'First',
color: 'white',
backgroundColor: 'black',
},
{
label: 'Second',
color: 'red',
activeColor: 'blue',
backgroundColor: 'yellow',
},
{
label: 'Third',
activeColor: 'green',
backgroundColor: 'purple',
},
],
border: 'sky',
rounded: true,
disabled: false,
size: 'large',
},
};