notAvailable.stories.js 985 B

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