mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Storybook: Fix Button story (#34357)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user