export const Playground: Story = {}
export const ButtonVariants: Story = {
render: (args) => (
<>
>
),
decorators: [
(Story) => (
),
],
}
export const ButtonVariantsReversed: Story = {
render: (args) => (
),
parameters: {
reverseColors: true,
backgrounds: { default: 'Purple 700' },
},
}
export const ButtonSizes: Story = {
render: (args) => (
<>
>
),
decorators: [
(Story) => (
),
],
}
export const ButtonWithIconStart: Story = {
args: {
icon: ,
},
}
export const ButtonWithIconEnd: Story = {
args: {
icon: ,
iconPosition: 'end',
},
}
export const IconButton: Story = {
args: {
children: 'Remove highlights from: May 8, 2024',
icon: ,
hasHiddenLabel: true,
},
}
export const ReversedButton: Story = {
render: (args) => (
),
parameters: {
backgrounds: { default: 'Purple 700' },
},
}
export const ButtonFullWidth: Story = {
args: {
isFullWidth: true,
},
}
export const ButtonWithBadge: Story = {
args: {
children: (
<>
Label
3
>
),
},
}
// Dos and Donts
export const DoExamplePrimaryAndSecondary: Story = {
render: () => {
return (
<>
>
)
},
decorators: [
(Story) => (
),
],
}
export const DontExamplePrimaryAndSecondary: Story = {
render: () => {
return (
<>
>
)
},
decorators: [
(Story) => (
),
],
}
export const DoExampleCta: Story = {
render: () => {
return (
<>
>
)
},
}
export const DoExampleDefaultToMediumSize: Story = {
render: () => {
return (
<>
>
)
},
}
export const DontExampleDefaultToMediumSize: Story = {
render: () => {
return (
<>
>
)
},
}
export const DoExampleUseIconsSparingly: Story = {
args: {
children: 'Add user',
icon: ,
iconPosition: 'end',
},
}
export const DontExampleUseIconsSparingly: Story = {
args: {
children: 'Add user',
icon: ,
iconPosition: 'end',
},
}
export const DoExampleUseTooltips: Story = {
args: {
children: 'Delete',
icon: ,
hasHiddenLabel: true,
variant: 'tertiary',
},
render: (args) => (
Delete content
),
}
export const DontExampleUseTooltips: Story = {
args: {
children: 'Delete',
icon: ,
hasHiddenLabel: true,
variant: 'tertiary',
},
}
export const DoExampleMenuButton: Story = {
render: () => (
}
iconPosition="end"
>
Manage
),
}
export const DoExampleKebabMenuButton: Story = {
render: () => (
}
iconPosition="end"
hasHiddenLabel
>
Manage
Manage
),
}
export const DoExampleMinimalPunctuation: Story = {
args: {
children: 'View tour',
variant: 'secondary',
},
}
export const DontExampleMinimalPunctuation: Story = {
args: {
children: "What's new?",
variant: 'secondary',
},
}
export const DoExampleSecondPerson: Story = {
args: {
children: 'View your reports',
variant: 'secondary',
},
}
export const DontExampleSecondPerson: Story = {
args: {
children: 'View my reports',
variant: 'secondary',
},
}
export const DoExampleFunctionalLabels: Story = {
args: {
children: 'Edit report',
variant: 'secondary',
},
}
export const DontExampleFunctionalLabels: Story = {
args: {
children: 'Edit',
variant: 'secondary',
},
}
export const DoExampleClearAndConciseLabels: Story = {
args: {
children: 'Save',
variant: 'secondary',
},
}
export const DontExampleClearAndConciseLabels: Story = {
args: {
children: 'Go to next step',
variant: 'secondary',
},
}
export const DoExampleDeclareContext: Story = {
args: {
children: 'Create survey',
variant: 'secondary',
},
}
export const DontExampleDeclareContext: Story = {
args: {
children: 'Create',
variant: 'secondary',
},
}
export const DoExampleTertiaryButtonWithIcons: Story = {
args: {
children: 'Edit cycle',
variant: 'tertiary',
icon: ,
},
}
export const DontExampleTertiaryButtonWithIcons: Story = {
args: {
children: 'Edit cycle',
variant: 'tertiary',
},
}
export const ButtonMenuPattern: Story = {
name: 'Button + Menu Pattern',
render: () => (
}
variant="secondary"
hasHiddenLabel
>
More surveys
),
}