issueResolution.stories.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. import MutedBox from 'sentry/components/mutedBox';
  2. import ResolutionBox from 'sentry/components/resolutionBox';
  3. const actor = {
  4. email: 'uhoh@example.com',
  5. name: 'Uhoh',
  6. };
  7. const RESOLVED_IN_COMMIT = {
  8. actor,
  9. inCommit: {
  10. id: 'deadbeefdeadface',
  11. repository: {
  12. name: 'getsentry/sentry',
  13. provider: {
  14. id: 'github',
  15. },
  16. },
  17. dateCreated: '2020-07-01 12:13:14',
  18. },
  19. };
  20. export default {
  21. title: 'Features/Issues/Resolution Box & Muted Box',
  22. };
  23. export const ResolvedStates = () => (
  24. <div>
  25. <div className="section">
  26. <h3>Basic resolution</h3>
  27. <ResolutionBox projectId="1" statusDetails={{}} />
  28. </div>
  29. <div className="section">
  30. <h3>Commit resolution</h3>
  31. <ResolutionBox projectId="1" statusDetails={RESOLVED_IN_COMMIT} />
  32. </div>
  33. <div className="section">
  34. <h3>Release resolution</h3>
  35. <ResolutionBox projectId="1" statusDetails={{inRelease: '20.07', actor}} />
  36. </div>
  37. <div className="section">
  38. <h3>Next Release resolution</h3>
  39. <ResolutionBox projectId="1" statusDetails={{inNextRelease: true, actor}} />
  40. </div>
  41. </div>
  42. );
  43. ResolvedStates.storyName = 'Resolved States';
  44. export const MutedStates = () => (
  45. <div>
  46. <div className="section">
  47. <h3>Basic mute</h3>
  48. <MutedBox statusDetails={{}} />
  49. </div>
  50. <div className="section">
  51. <h3>Mute Until</h3>
  52. <MutedBox statusDetails={{ignoreUntil: '2020-07-01 12:13:14'}} />
  53. </div>
  54. <div className="section">
  55. <h3>Mute count</h3>
  56. <MutedBox statusDetails={{ignoreCount: 10}} />
  57. </div>
  58. <div className="section">
  59. <h3>Mute count with window</h3>
  60. <MutedBox statusDetails={{ignoreCount: 10, ignoreWindow: 5}} />
  61. </div>
  62. <div className="section">
  63. <h3>Mute user count</h3>
  64. <MutedBox statusDetails={{ignoreUserCount: 10}} />
  65. </div>
  66. <div className="section">
  67. <h3>Mute user count with window</h3>
  68. <MutedBox statusDetails={{ignoreUserCount: 10, ignoreUserWindow: 5}} />
  69. </div>
  70. </div>
  71. );
  72. MutedStates.storyName = 'Muted States';