timeSince.stories.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. import TimeSince from 'sentry/components/timeSince';
  2. import Tooltip from 'sentry/components/tooltip';
  3. export default {
  4. title: 'Components/Time Since',
  5. component: Tooltip,
  6. };
  7. export const _TimeSince = args => {
  8. return <TimeSince {...args} />;
  9. };
  10. _TimeSince.args = {
  11. date: new Date('Oct 31, 2020 9:00:00 PM UTC'),
  12. disabledAbsoluteTooltip: false,
  13. extraShort: false,
  14. shorten: false,
  15. suffix: '',
  16. tooltipShowSeconds: false,
  17. tooltipTitle: null,
  18. tooltipUnderlineColor: 'black',
  19. };
  20. _TimeSince.argTypes = {
  21. date: {
  22. control: 'date',
  23. },
  24. tooltipUnderlineColor: {
  25. control: 'select',
  26. options: [
  27. 'black',
  28. 'white',
  29. 'surface100',
  30. 'surface200',
  31. 'surface300',
  32. 'surface400',
  33. 'gray500',
  34. 'gray400',
  35. 'gray300',
  36. 'gray200',
  37. 'gray100',
  38. 'translucentGray200',
  39. 'translucentGray100',
  40. 'purple400',
  41. 'purple300',
  42. 'purple200',
  43. 'purple100',
  44. 'blue400',
  45. 'blue300',
  46. 'blue200',
  47. 'blue100',
  48. 'green400',
  49. 'green300',
  50. 'green200',
  51. 'green100',
  52. 'yellow400',
  53. 'yellow300',
  54. 'yellow200',
  55. 'yellow100',
  56. 'red400',
  57. 'red300',
  58. 'red200',
  59. 'red100',
  60. 'pink400',
  61. 'pink300',
  62. 'pink200',
  63. 'pink100',
  64. 'active',
  65. 'activeHover',
  66. 'activeText',
  67. 'background',
  68. 'backgroundElevated',
  69. 'backgroundSecondary',
  70. 'bannerBackground',
  71. 'bodyBackground',
  72. 'border',
  73. 'buttonCount',
  74. 'buttonCountActive',
  75. 'chartLabel',
  76. 'chartLineColor',
  77. 'chartOther',
  78. 'disabled',
  79. 'disabledBorder',
  80. 'error',
  81. 'errorText',
  82. 'focus',
  83. 'focusBorder',
  84. 'formInputBorder',
  85. 'formPlaceholder',
  86. 'formText',
  87. 'headerBackground',
  88. 'headingColor',
  89. 'hover',
  90. 'inactive',
  91. 'innerBorder',
  92. 'linkColor',
  93. 'linkFocus',
  94. 'linkHoverColor',
  95. 'linkUnderline',
  96. 'overlayBackgroundAlpha',
  97. 'progressBackground',
  98. 'progressBar',
  99. 'rowBackground',
  100. 'searchTokenBackground',
  101. 'searchTokenBorder',
  102. 'subText',
  103. 'success',
  104. 'successText',
  105. 'tagBar',
  106. 'tagBarHover',
  107. 'textColor',
  108. 'translucentBorder',
  109. 'translucentInnerBorder',
  110. ],
  111. },
  112. };