Skip to content

Commit

Permalink
chore: improve stories
Browse files Browse the repository at this point in the history
  • Loading branch information
juliajforesti committed Aug 24, 2023
1 parent 2a39f84 commit ef91725
Showing 1 changed file with 14 additions and 36 deletions.
50 changes: 14 additions & 36 deletions packages/fuselage/src/components/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import type { ComponentStory, ComponentMeta } from '@storybook/react';
import React from 'react';

import { Button, ButtonGroup, Icon, IconButton, Margins } from '../..';
import { Button, ButtonGroup, IconButton, Margins } from '../..';
import { PropsVariationSection } from '../../../.storybook/helpers';

export default {
Expand Down Expand Up @@ -40,12 +40,6 @@ export const Default: ComponentStory<typeof Button> = () => (
<Button onClick={action('click')}>Button</Button>
);

export const Square: ComponentStory<typeof Button> = () => (
<Button square>
<Icon name='plus' size='x20' />
</Button>
);

export const Variants: ComponentStory<typeof Button> = () => (
<Margins all='x8'>
<ButtonGroup>
Expand Down Expand Up @@ -74,27 +68,11 @@ export const Variants: ComponentStory<typeof Button> = () => (
);

export const Sizes: ComponentStory<typeof ButtonGroup> = () => (
<>
<ButtonGroup marginBlockEnd={12}>
<Button small>Small</Button>
<Button medium>Medium</Button>
<Button>Default</Button>
</ButtonGroup>
<ButtonGroup>
<Button mini square>
<Icon name='circled-arrow-down' size='x16' />
</Button>
<Button tiny square>
<Icon name='circled-arrow-down' size='x20' />
</Button>
<Button small square>
<Icon name='circled-arrow-down' size='x24' />
</Button>
<Button square>
<Icon name='circled-arrow-down' size='x32' />
</Button>
</ButtonGroup>
</>
<ButtonGroup marginBlockEnd={12}>
<Button small>Small</Button>
<Button medium>Medium</Button>
<Button>Default</Button>
</ButtonGroup>
);

export const AsLink: ComponentStory<typeof Button> = () => (
Expand All @@ -116,10 +94,6 @@ export const States = () => (
disabled: { disabled: true },
}}
yAxis={{
'square + icon': {
square: true,
children: <Icon name='circled-arrow-down' size='x20' />,
},
'icon + text': {
children: 'Button',
icon: 'baloon-text',
Expand Down Expand Up @@ -178,10 +152,6 @@ export const States = () => (
disabled: { disabled: true },
}}
yAxis={{
'square + icon': {
square: true,
children: <Icon name='circled-arrow-down' size='x20' />,
},
'icon + text': {
children: 'Button',
icon: 'baloon-text',
Expand Down Expand Up @@ -232,3 +202,11 @@ export const States = () => (
export const AsIconButton: ComponentStory<typeof IconButton> = (args) => (
<IconButton {...args} icon='arrow-back' onClick={action('click')} />
);

AsIconButton.parameters = {
docs: {
description: {
story: 'See full documentation on Inputs/IconButton.',
},
},
};

0 comments on commit ef91725

Please sign in to comment.