deployBadge.stories.js 924 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import DeployBadge from 'sentry/components/deployBadge';
  2. export default {
  3. title: 'Components/Badges/Deploy Badge',
  4. component: DeployBadge,
  5. args: {
  6. deploy: {
  7. name: '85fedddce5a61a58b160fa6b3d6a1a8451e94eb9 to prod',
  8. url: null,
  9. environment: 'production',
  10. dateStarted: null,
  11. dateFinished: '2020-05-11T18:12:00.025928Z',
  12. id: '6348842',
  13. },
  14. },
  15. };
  16. export const Default = ({deploy}) => (
  17. <div>
  18. <div>
  19. <DeployBadge deploy={deploy} orgSlug="sentry" version="1.2.3" />
  20. </div>
  21. <div>
  22. <DeployBadge
  23. deploy={{...deploy, environment: 'verylongenvironment'}}
  24. orgSlug="sentry"
  25. version="1.2.3"
  26. />
  27. </div>
  28. <div>
  29. <DeployBadge deploy={deploy} />
  30. </div>
  31. </div>
  32. );
  33. Default.storyName = 'Deploy Badge';
  34. Default.parameters = {
  35. docs: {
  36. description: {
  37. story: 'Used to display deploy in a "badge"',
  38. },
  39. },
  40. };