Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Button
- ### What it does
- It's a button with standard styles for primary and secondary buttons. Use type to switch between the different variants of button.
- ### Example
- ```
- <Button
- color='#fff'
- title={buttonTitle}
- type='secondaryStatic'
- />
- ```
- ### Props
- Option | Type | Default | Description
- ------ | ---- | ------- | -----------
- className | string | n/a | Allows the component to be extended by Styled Components.
- color | string | Varies for type of button | Change the default colour of the background or border & text depending on type of button.
- href | string | n/a | Will only work an undefined or secondary type.
- onClick | function | n/a | Allowing functions to be passed to buttons.
- style | object | n/a | Allows inline styles.
- tabIndex | int | n/a | Allows tab index to be given to the component.
- target | string | n/a | Passes the property target to the ``<a>`` tag.
- title | string | n/a | Required for text inside the button.
- to | string | n/a | Allows a path specific to the website (e.g. '/fixed-saver') to be given to the link.
- type | string | undefined (Primary) | Choose from ``secondary``, ``secondaryStatic``, ``print`` or leave it undefined for a primary button.
Add Comment
Please, Sign In to add comment