icon.stories.js 839 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import Icon from '../js/shared/components/icon'
  2. export const Type = args => {
  3. return (
  4. <>
  5. <Icon {...args} />
  6. <div>
  7. <a
  8. href="https://fontawesome.com/v4.7.0/icons/"
  9. target="_blank"
  10. rel="noopener noreferrer"
  11. >
  12. Font Awesome icons
  13. </a>
  14. </div>
  15. </>
  16. )
  17. }
  18. Type.args = {
  19. type: 'tasks',
  20. }
  21. export const Spinner = args => {
  22. return <Icon {...args} />
  23. }
  24. Spinner.args = {
  25. type: 'spinner',
  26. spin: true,
  27. }
  28. export const FixedWidth = args => {
  29. return <Icon {...args} />
  30. }
  31. FixedWidth.args = {
  32. type: 'tasks',
  33. fw: true,
  34. }
  35. export const AccessibilityLabel = args => {
  36. return <Icon {...args} />
  37. }
  38. AccessibilityLabel.args = {
  39. type: 'check',
  40. accessibilityLabel: 'Check',
  41. }
  42. export default {
  43. title: 'Shared / Components / Icon',
  44. component: Icon,
  45. }