github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/stories/Tooltip.stories.tsx (about)

     1  /* eslint-disable react/jsx-props-no-spreading */
     2  import React from 'react';
     3  import { Tooltip } from '../webapp/javascript/ui/Tooltip';
     4  import { TooltipInfoIcon } from '../webapp/javascript/ui/TooltipInfoIcon';
     5  import { ComponentMeta } from '@storybook/react';
     6  import '../webapp/sass/profile.scss';
     7  
     8  export default {
     9    title: 'Components/Tooltip',
    10    component: Tooltip,
    11  } as ComponentMeta<typeof Tooltip>;
    12  
    13  export const MyTooltip = () => {
    14    return (
    15      <Tooltip title="I should display be displayed on hover">
    16        <span>hover me</span>
    17      </Tooltip>
    18    );
    19  };
    20  
    21  export const TooltipInfo = () => {
    22    return (
    23      <Tooltip title="use me for informational data">
    24        <TooltipInfoIcon />
    25      </Tooltip>
    26    );
    27  };