Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | import React from 'react'
import ButtonComponent from './Button'
import { action } from '@storybook/addon-actions'
import { BADGE } from '@geometricpanda/storybook-addon-badges'
import { addDefaults, addArgTypes } from 'common/utils/storybookMode'
const defaultProps = { onClick: action('onClick') }
const addTheme = addDefaults({
defaultProps,
figmaURL: 'https://www.figma.com/file/pFx6z24OMgktLQL64aKYjG/Booksys?node-id=147%3A2',
})
export default {
title: 'Components/Button',
parameters: {
badges: [BADGE.STABLE],
},
argTypes: addArgTypes({
content: {
defaultValue: 'This is a button',
type: 'string',
},
styleType: {
options: ['primary', 'secondary'],
control: { type: 'radio' },
},
isDisabled: {
control: { type: 'boolean' },
defaultValue: false,
},
}),
}
export const Button = addTheme((props) => (
<ButtonComponent {...props}>{props.content}</ButtonComponent>
))
|