Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Commit

Permalink
Button story
Browse files Browse the repository at this point in the history
  • Loading branch information
W3stside committed Nov 16, 2020
1 parent f573768 commit 29c2ebe
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/components/common/Button/index.stories.tsx
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,
}

0 comments on commit 29c2ebe

Please sign in to comment.