Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(tooltip): use Button instead of Information icons in stories #17006

Merged
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
27b3008
docs(tooltip): use SquareOutline instead of Information icons in stories
tay1orjones Jul 19, 2024
2b6137f
docs(tooltip): use Button instead of Information icon in stories
tay1orjones Jul 19, 2024
f80393a
docs(tooltip): use Button instead of Information icon in mdx docs
tay1orjones Jul 19, 2024
e400716
docs(formlabel): remove tooltip example from formlabel stories
tay1orjones Jul 19, 2024
aaf2696
chore(tooltip): add missing import
tay1orjones Jul 19, 2024
d3988b9
Merge branch 'main' into update-tooltip-icons
tay1orjones Jul 22, 2024
b308d0d
fix(tooltip): add squareoutline import
tay1orjones Aug 12, 2024
ed75e1f
Merge branch 'main' of github.com:carbon-design-system/carbon into up…
tay1orjones Aug 15, 2024
c7d6906
test(formlabel): remove tooltip tests
tay1orjones Aug 15, 2024
eb738a7
Merge branch 'main' into update-tooltip-icons
tay1orjones Oct 15, 2024
38e7e92
docs(tooltip): remove classname for custom story classes
tay1orjones Oct 15, 2024
6048876
Merge branch 'main' into update-tooltip-icons
tay1orjones Oct 15, 2024
c76f68e
Merge branch 'main' into update-tooltip-icons
tay1orjones Oct 16, 2024
02c40ce
Merge branch 'main' into update-tooltip-icons
alisonjoseph Oct 17, 2024
2ad523b
Merge branch 'main' into update-tooltip-icons
tay1orjones Oct 21, 2024
2f4d5f3
Merge branch 'main' into update-tooltip-icons
kennylam Oct 29, 2024
7ff9464
Merge branch 'main' into update-tooltip-icons
alisonjoseph Oct 31, 2024
8e68c98
Merge branch 'main' into update-tooltip-icons
tay1orjones Nov 6, 2024
f1ab2ce
Merge branch 'main' into update-tooltip-icons
tay1orjones Nov 15, 2024
66301b3
Merge branch 'main' into update-tooltip-icons
tay1orjones Nov 15, 2024
2345771
Merge branch 'main' into update-tooltip-icons
tay1orjones Nov 15, 2024
86c0de1
test(formlabel): update vrt story id
tay1orjones Nov 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions packages/react/src/components/FormLabel/FormLabel.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,10 @@ export default {

export const Default = () => <FormLabel>Form label</FormLabel>;

export const WithTooltip = (controls) => {
export const WithToggletip = (controls) => {
const { align } = controls;
return (
<>
<div className="form-wrapper">
<FormLabel>Form label with Tooltip</FormLabel>
<Tooltip
align="bottom"
label="This can be used to provide more information about a field.">
<button className="cds--tooltip__trigger" type="button">
<Information />
</button>
</Tooltip>
</div>
<div className="form-wrapper">
<FormLabel>Form label with Toggletip</FormLabel>
<Toggletip align={align}>
Expand Down
22 changes: 8 additions & 14 deletions packages/react/src/components/Tooltip/Tooltip.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import './story.scss';

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

export default {
Expand Down Expand Up @@ -55,19 +55,15 @@ 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 className="sb-tooltip-trigger" type="button">
<Information />
</button>
<Button className="sb-tooltip-trigger">This button has a tooltip</Button>
</Tooltip>
);
};

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