hovercard.stories.js 771 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import {Hovercard} from 'sentry/components/hovercard';
  2. export default {
  3. title: 'Components/Tooltips/Hovercard',
  4. component: Hovercard,
  5. args: {
  6. header: 'Header',
  7. body: 'Body',
  8. position: 'top',
  9. },
  10. argTypes: {
  11. tipColor: {control: 'color'},
  12. show: {
  13. type: 'select',
  14. options: [undefined, false, true],
  15. },
  16. },
  17. };
  18. export const _Hovercard = ({...args}) => (
  19. <div
  20. style={{
  21. height: 300,
  22. display: 'flex',
  23. justifyContent: 'center',
  24. alignItems: 'center',
  25. }}
  26. >
  27. <Hovercard {...args}>Hover over me</Hovercard>
  28. </div>
  29. );
  30. _Hovercard.parameters = {
  31. docs: {
  32. description: {
  33. story:
  34. 'Good luck if your container element is near the top and/or left side of the screen',
  35. },
  36. },
  37. };