alertLink.stories.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. import AlertLink from 'sentry/components/alertLink';
  2. import {IconDocs, IconGeneric, IconMail, IconStack, IconStar} from 'sentry/icons';
  3. export default {
  4. title: 'Components/Alerts/Alert Links',
  5. component: AlertLink,
  6. };
  7. export const Default = () => [
  8. <AlertLink to="/settings/account/notifications" key="1">
  9. Check out the notifications settings panel.
  10. </AlertLink>,
  11. <AlertLink to="/settings/account/notifications" priority="error" key="2">
  12. Do not forget to read the docs ya dum dum!
  13. </AlertLink>,
  14. <AlertLink to="/settings/account/notifications" priority="info" key="3">
  15. Install this thing or else!
  16. </AlertLink>,
  17. <AlertLink to="/settings/account/notifications" priority="success" key="4">
  18. Gj you did it. Now go here.
  19. </AlertLink>,
  20. <AlertLink to="/settings/account/notifications" priority="muted" key="5">
  21. I am saying nothing, ok?
  22. </AlertLink>,
  23. ];
  24. Default.storyName = 'Default';
  25. Default.parameters = {
  26. docs: {
  27. description: {
  28. story: 'A way to loudly link between different parts of the application',
  29. },
  30. },
  31. };
  32. export const WithAnIcon = () => [
  33. <AlertLink to="/settings/account/notifications" icon={<IconMail />} key="1">
  34. Gumbo beet greens corn soko endive gumbo gourd. Parsley shallot courgette tatsoi pea
  35. sprouts fava bean collard greens dandelion okra wakame tomato. Dandelion cucumber
  36. earthnut pea peanut soko zucchini.
  37. </AlertLink>,
  38. <AlertLink
  39. to="/settings/account/notifications"
  40. icon={<IconDocs />}
  41. priority="error"
  42. key="2"
  43. >
  44. Do not forget to read the docs ya dum dum!
  45. </AlertLink>,
  46. <AlertLink
  47. to="/settings/account/notifications"
  48. icon={<IconStack />}
  49. priority="info"
  50. key="3"
  51. >
  52. Install this thing or else!
  53. </AlertLink>,
  54. <AlertLink
  55. to="/settings/account/notifications"
  56. icon={<IconStar />}
  57. priority="success"
  58. key="4"
  59. >
  60. Gj you did it. Now go here.
  61. </AlertLink>,
  62. <AlertLink
  63. to="/settings/account/notifications"
  64. icon={<IconGeneric />}
  65. priority="muted"
  66. key="5"
  67. >
  68. I am saying nothing, ok?
  69. </AlertLink>,
  70. ];
  71. WithAnIcon.storyName = 'With an icon';
  72. WithAnIcon.parameters = {
  73. docs: {
  74. description: {
  75. story: 'You can optionally pass an icon src',
  76. },
  77. },
  78. };
  79. export const Small = () => [
  80. <AlertLink to="/settings/account/notifications" size="sm" key="1">
  81. Check out the notifications settings panel.
  82. </AlertLink>,
  83. <AlertLink to="/settings/account/notifications" priority="error" size="sm" key="2">
  84. Do not forget to read the docs ya dum dum!
  85. </AlertLink>,
  86. <AlertLink to="/settings/account/notifications" priority="info" size="sm" key="3">
  87. Install this thing or else!
  88. </AlertLink>,
  89. <AlertLink to="/settings/account/notifications" priority="success" size="sm" key="4">
  90. Gj you did it. Now go here.
  91. </AlertLink>,
  92. <AlertLink to="/settings/account/notifications" priority="muted" size="sm" key="5">
  93. I am saying nothing, ok?
  94. </AlertLink>,
  95. ];
  96. Small.storyName = 'Small';
  97. Small.parameters = {
  98. docs: {
  99. description: {
  100. story: 'You can optionally pass an icon src',
  101. },
  102. },
  103. };