loadingIndicator.stories.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import LoadingIndicator from 'sentry/components/loadingIndicator';
  2. import LoadingTriangle from 'sentry/components/loadingTriangle';
  3. export default {
  4. title: 'Components/Loading Indicators',
  5. component: LoadingIndicator,
  6. };
  7. export const All = () => (
  8. <div>
  9. <div>
  10. Default
  11. <LoadingIndicator />
  12. </div>
  13. <div style={{marginBottom: 240}}>
  14. Mini
  15. <LoadingIndicator mini />
  16. </div>
  17. <div>
  18. Triangle
  19. <div style={{position: 'relative'}}>
  20. <LoadingTriangle />
  21. </div>
  22. </div>
  23. </div>
  24. );
  25. All.storyName = 'Overview';
  26. All.parameters = {
  27. docs: {
  28. description: {
  29. story: 'Loading indicators. Triangle has negative margins.',
  30. },
  31. },
  32. };
  33. export const Default = () => <LoadingIndicator>Loading message</LoadingIndicator>;
  34. Default.storyName = 'Default';
  35. export const Mini = () => <LoadingIndicator mini>Loading message</LoadingIndicator>;
  36. Mini.storyName = 'Mini';
  37. Mini.parameters = {
  38. docs: {
  39. description: {
  40. story: 'Small loading indicator',
  41. },
  42. },
  43. };
  44. export const Triangle = () => (
  45. <div style={{paddingBottom: 300}}>
  46. <LoadingTriangle>Loading message</LoadingTriangle>
  47. </div>
  48. );
  49. Triangle.storyName = 'Triangle';
  50. Triangle.parameters = {
  51. docs: {
  52. description: {
  53. story: 'Triangle loading indicator. Be aware it has negative margins.',
  54. },
  55. },
  56. };