Skip to content

Commit

Permalink
docs(tooltip): revert to peviously correct stories, use help icon
Browse files Browse the repository at this point in the history
  • Loading branch information
tay1orjones committed Dec 11, 2024
1 parent e6ee8dd commit e6dab2e
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions packages/react/src/components/Tooltip/Tooltip.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@

import './story.scss';

import { Help } from '@carbon/icons-react';
import React, { useRef, useEffect } from 'react';
import { SquareOutline } from '@carbon/icons-react';
import { Tooltip } from './';
import Button from './../Button';
import mdx from './Tooltip.mdx';

export default {
Expand Down Expand Up @@ -56,15 +55,19 @@ export const Default = () => {
'Occasionally, services are updated in a specified time window to ensure no down time for customers.';
return (
<Tooltip align="bottom" label={label}>
<Button>This button has a tooltip</Button>
<button className="sb-tooltip-trigger" type="button">
<Help />
</button>
</Tooltip>
);
};

export const Alignment = () => {
return (
<Tooltip label="Tooltip alignment" align="bottom-left">
<Button>This button has a tooltip</Button>
<button className="sb-tooltip-trigger" type="button">
<Help />
</button>
</Tooltip>
);
};
Expand All @@ -86,7 +89,9 @@ export const ExperimentalAutoAlign = () => {
left: '2500px',
}}>
<Tooltip label={tooltipLabel} align="top" autoAlign>
<Button ref={ref}>This button has a tooltip</Button>
<button className="sb-tooltip-trigger" type="button" ref={ref}>
<Help />
</button>
</Tooltip>
</div>
</div>
Expand All @@ -96,7 +101,9 @@ export const ExperimentalAutoAlign = () => {
export const Duration = () => {
return (
<Tooltip label="Label one" enterDelayMs={0} leaveDelayMs={300}>
<Button>This button has a tooltip</Button>
<button className="sb-tooltip-trigger" type="button">
<Help />
</button>
</Tooltip>
);
};
Expand All @@ -120,8 +127,8 @@ const PlaygroundStory = (props) => {
label={label}
leaveDelayMs={leaveDelayMs}
closeOnActivation={closeOnActivation}>
<button type="button">
<SquareOutline />
<button className="sb-tooltip-trigger" type="button">
<Help />
</button>
</Tooltip>
);
Expand Down

0 comments on commit e6dab2e

Please sign in to comment.