Guest User

Untitled

a guest
Feb 16th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. # Button
  2.  
  3. ### What it does
  4. It's a button with standard styles for primary and secondary buttons. Use type to switch between the different variants of button.
  5.  
  6. ### Example
  7. ```
  8. <Button
  9. color='#fff'
  10. title={buttonTitle}
  11. type='secondaryStatic'
  12. />
  13. ```
  14.  
  15. ### Props
  16. Option | Type | Default | Description
  17. ------ | ---- | ------- | -----------
  18. className | string | n/a | Allows the component to be extended by Styled Components.
  19. color | string | Varies for type of button | Change the default colour of the background or border & text depending on type of button.
  20. href | string | n/a | Will only work an undefined or secondary type.
  21. onClick | function | n/a | Allowing functions to be passed to buttons.
  22. style | object | n/a | Allows inline styles.
  23. tabIndex | int | n/a | Allows tab index to be given to the component.
  24. target | string | n/a | Passes the property target to the ``<a>`` tag.
  25. title | string | n/a | Required for text inside the button.
  26. to | string | n/a | Allows a path specific to the website (e.g. '/fixed-saver') to be given to the link.
  27. 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