Storybook: Fix Button story (#34357)

This commit is contained in:
Alex Khomenko
2021-05-19 12:22:39 +03:00
committed by GitHub
parent 71fd0981ca
commit 0a2054bbe0
2 changed files with 3 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
import { Meta, Story, Preview, Props } from '@storybook/addon-docs/blocks';
import { Meta, Preview, ArgsTable } from '@storybook/addon-docs/blocks';
import { Button, LinkButton } from './Button';
<Meta title="MDX|Button" component={Button} />
@@ -80,7 +80,7 @@ Used for triggering a removing or deleting action. Because of its dominant color
</div>
</Preview>
<Props of={Button} />
<ArgsTable of={Button} />
## Links

View File

@@ -1,7 +1,6 @@
import React from 'react';
import { Story, Meta } from '@storybook/react';
import { allButtonVariants, allButtonFills, Button, ButtonProps } from './Button';
import { iconOptions } from '../../utils/storybook/knobs';
import mdx from './Button.mdx';
import { HorizontalGroup, VerticalGroup } from '../Layout/Layout';
import { ButtonGroup } from './ButtonGroup';
@@ -11,11 +10,6 @@ import { Card } from '../Card/Card';
export default {
title: 'Buttons/Button',
component: Button,
argTypes: {
variant: { control: 'select' },
size: { control: 'select' },
icon: { control: { type: 'select', options: iconOptions } },
},
parameters: {
docs: {
page: mdx,
@@ -23,13 +17,10 @@ export default {
knobs: {
disable: true,
},
controls: {
exclude: ['css', 'className'],
},
},
} as Meta;
export const Variants: Story<ButtonProps> = ({ children, ...args }) => {
export const Variants: Story<ButtonProps> = () => {
const sizes: ComponentSize[] = ['lg', 'md', 'sm'];
return (
<VerticalGroup>