processingIssueHint.stories.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import {Fragment} from 'react';
  2. import ProcessingIssueHint from 'sentry/components/stream/processingIssueHint';
  3. export default {
  4. title: 'Features/Issues/Processing Issue Hint',
  5. args: {
  6. showProject: false,
  7. },
  8. };
  9. export const Default = ({showProject}) => {
  10. const issue = {
  11. project: 'sentry-test',
  12. numIssues: 6,
  13. issuesProcessing: 4,
  14. resolveableIssues: 2,
  15. signedLink: '',
  16. lastSeen: new Date().toISOString(),
  17. hasMoreResolveableIssues: true,
  18. hasIssues: true,
  19. };
  20. const warning = {...issue, numIssues: 0};
  21. const info = {...issue, numIssues: 0, issuesProcessing: 0};
  22. return (
  23. <Fragment>
  24. <ProcessingIssueHint
  25. issue={issue}
  26. projectId={issue.project}
  27. orgId="organization-slug"
  28. showProject={showProject}
  29. />
  30. <br />
  31. <ProcessingIssueHint
  32. issue={warning}
  33. projectId={warning.project}
  34. orgId="organization-slug"
  35. showProject={showProject}
  36. />
  37. <br />
  38. <ProcessingIssueHint
  39. issue={info}
  40. projectId={info.project}
  41. orgId="organization-slug"
  42. showProject={showProject}
  43. />
  44. </Fragment>
  45. );
  46. };
  47. Default.storyName = 'Processing Issue Hint';