Skip to content

Instantly share code, notes, and snippets.

@alexdisdier
Created March 6, 2020 22:38
Show Gist options
  • Save alexdisdier/f8b9523d428f7b7792f34f999c8e7748 to your computer and use it in GitHub Desktop.
Save alexdisdier/f8b9523d428f7b7792f34f999c8e7748 to your computer and use it in GitHub Desktop.
A README file for a button story

Button


A component for triggering a user action. e.g: a submit button in a form

Import
import { Button } from 'your-library-name';
Usage
<Button onClick={() => 'Do something'}>I am a button</Button>
Required props
Name Type Description
children node e.g: Add a label or an icon
Optional props
Name Type Default Description
onClick function () => {}
disabled boolean false
type string submit
color string button Either an Hex or a name
dataTestId string button specify the action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment