This repository has been archived by the owner on Jan 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from 'react' | ||
// also exported from '@storybook/react' if you can deal with breaking changes in 6.1 | ||
import { Story, Meta } from '@storybook/react/types-6-0' | ||
import { ButtonBase } from '.' | ||
import { DarkModeThemeToggler } from 'storybook/decorators' | ||
|
||
export default { | ||
title: 'Common/Button', | ||
component: ButtonBase, | ||
decorators: [DarkModeThemeToggler], | ||
argTypes: { | ||
label: { control: 'text' }, | ||
theme: { | ||
control: null, | ||
}, | ||
as: { | ||
control: null, | ||
}, | ||
forwardedAs: { | ||
control: null, | ||
}, | ||
}, | ||
} as Meta | ||
|
||
const Template: Story = (args) => <ButtonBase {...args}>{args.label}</ButtonBase> | ||
|
||
export const PrimaryButton = Template.bind({}) | ||
PrimaryButton.args = { | ||
label: 'Main Button', | ||
} | ||
|
||
export const SecondaryButton = Template.bind({}) | ||
SecondaryButton.args = { | ||
label: 'SecondaryButton', | ||
$alt: true, | ||
$border: true, | ||
} |