Last active
October 24, 2019 15:38
-
-
Save JoshK2/4d4da7f694ac6a2258cec1c308611171 to your computer and use it in GitHub Desktop.
Create React typescript components library - Storybook - stories file examples
This file contains hidden or 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
import React from 'react'; | |
import { action } from '@storybook/addon-actions'; | |
import Button from '../src/components/Button'; | |
export default { | |
title: 'Button', | |
}; | |
export const text = () => <Button text="Hello Button" onClick={action('clicked')} />; | |
export const disableOption = () => ( | |
<Button onClick={action('clicked')} disable> | |
Hello Button | |
</Button> | |
); | |
export const emoji = () => ( | |
<Button onClick={action('clicked')}> | |
<span role="img" aria-label="so cool"> | |
π π π π― | |
</span> | |
</Button> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment