alertLink.stories.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import React from 'react';
  2. import {storiesOf} from '@storybook/react';
  3. import {withInfo} from '@storybook/addon-info';
  4. import AlertLink from 'app/components/alertLink';
  5. storiesOf('UI|Alerts/AlertLink', module)
  6. .add(
  7. 'default',
  8. withInfo('A way to loudly link between different parts of the application')(() => [
  9. <AlertLink to="/settings/account/notifications" key="1">
  10. Check out the notifications settings panel.
  11. </AlertLink>,
  12. <AlertLink to="/settings/account/notifications" priority="error" key="2">
  13. Do not forget to read the docs ya dum dum!
  14. </AlertLink>,
  15. <AlertLink to="/settings/account/notifications" priority="info" key="3">
  16. Install this thing or else!
  17. </AlertLink>,
  18. <AlertLink to="/settings/account/notifications" priority="success" key="4">
  19. Gj you did it. Now go here.
  20. </AlertLink>,
  21. <AlertLink to="/settings/account/notifications" priority="muted" key="5">
  22. I am saying nothing, ok?
  23. </AlertLink>,
  24. ])
  25. )
  26. .add(
  27. 'with an icon',
  28. withInfo('You can optionally pass an icon src')(() => [
  29. <AlertLink to="/settings/account/notifications" icon="icon-mail" key="1">
  30. Check out the notifications settings panel.
  31. </AlertLink>,
  32. <AlertLink
  33. to="/settings/account/notifications"
  34. icon="icon-docs"
  35. priority="error"
  36. key="2"
  37. >
  38. Do not forget to read the docs ya dum dum!
  39. </AlertLink>,
  40. <AlertLink
  41. to="/settings/account/notifications"
  42. icon="icon-stack"
  43. priority="info"
  44. key="3"
  45. >
  46. Install this thing or else!
  47. </AlertLink>,
  48. <AlertLink
  49. to="/settings/account/notifications"
  50. icon="icon-star"
  51. priority="success"
  52. key="4"
  53. >
  54. Gj you did it. Now go here.
  55. </AlertLink>,
  56. <AlertLink
  57. to="/settings/account/notifications"
  58. icon="icon-generic-box"
  59. priority="muted"
  60. key="5"
  61. >
  62. I am saying nothing, ok?
  63. </AlertLink>,
  64. ])
  65. );