Skip to content

Instantly share code, notes, and snippets.

@JoshK2
Last active October 24, 2019 15:47
Show Gist options
  • Save JoshK2/5b1f805d4196ae3c741f4777019362cb to your computer and use it in GitHub Desktop.
Save JoshK2/5b1f805d4196ae3c741f4777019362cb to your computer and use it in GitHub Desktop.
Create React typescript components library - button stories file
import React from 'react';
import { action } from '@storybook/addon-actions';
import Button from './';
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