notAvailable.stories.js 966 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import NotAvailable from 'sentry/components/notAvailable';
  2. import PanelTable from 'sentry/components/panels/panelTable';
  3. export default {
  4. title: 'Views/Not Available',
  5. component: NotAvailable,
  6. };
  7. export const Default = () => (
  8. <div>
  9. <div className="section">
  10. <h3>Alone</h3>
  11. <NotAvailable />
  12. </div>
  13. <div className="section">
  14. <h3>In a Table</h3>
  15. <PanelTable headers={['Header #1', 'Header #2']}>
  16. <div>Panel Item with really long content</div>
  17. <div>
  18. <NotAvailable />
  19. </div>
  20. </PanelTable>
  21. </div>
  22. <div className="section">
  23. <h3>With Tooltip</h3>
  24. <NotAvailable tooltip="Reason why this is not available" />
  25. </div>
  26. </div>
  27. );
  28. Default.storyName = 'Not Available';
  29. Default.parameters = {
  30. docs: {
  31. description: {
  32. story:
  33. "When you don't have data to display, but don't want to display an empty space. It's commonly used in a table.",
  34. },
  35. },
  36. };