f226a376b1
## Change - Update package versions - Replace @storybook/addons, @storybook/addon-actions to @storybook/addon-essentials - Replace examples of button, the action function is legacy: https://storybook.js.org/docs/react/essentials/actions#advanced--legacy-usage
25 lines
544 B
JavaScript
25 lines
544 B
JavaScript
import React from 'react'
|
|
import { Button } from '@storybook/react/demo'
|
|
|
|
export default {
|
|
title: 'Button',
|
|
argTypes: { onClick: { action: 'clicked' } },
|
|
}
|
|
|
|
const TemplateWithText = (args) => <Button {...args}>Hello Button</Button>
|
|
|
|
const TemplateWithEmoji = (args) => (
|
|
<Button {...args}>
|
|
<span role="img" aria-label="so cool">
|
|
😀 😎 👍 💯
|
|
</span>
|
|
</Button>
|
|
)
|
|
|
|
export const withText = TemplateWithText.bind({})
|
|
|
|
withText.args = {}
|
|
|
|
export const withSomeEmoji = TemplateWithEmoji.bind({})
|
|
|
|
withSomeEmoji.args = {}
|