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

fix(tooltip): ensure tooltip is not hidden in storybook #5304

Merged
merged 8 commits into from
Feb 10, 2020
13 changes: 9 additions & 4 deletions packages/react/src/components/Tooltip/Tooltip-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ const props = {
}),
};

const containerStyles = {
marginTop: '2rem',
marginLeft: '5rem',
};

Tooltip.displayName = 'Tooltip';

function UncontrolledTooltipExample() {
Expand Down Expand Up @@ -91,7 +96,7 @@ storiesOf('Tooltip', module)
.add(
'default (bottom)',
() => (
<div style={{ marginTop: '2rem' }}>
<div style={containerStyles}>
<Tooltip {...props.withIcon()} tooltipBodyId="tooltip-body">
<p id="tooltip-body">
This is some tooltip text. This box shows the maximum amount of text
Expand Down Expand Up @@ -120,7 +125,7 @@ storiesOf('Tooltip', module)
.add(
'no icon',
() => (
<div style={{ marginTop: '2rem' }}>
<div style={containerStyles}>
<Tooltip {...props.withoutIcon()}>
<p>
This is some tooltip text. This box shows the maximum amount of text
Expand Down Expand Up @@ -149,7 +154,7 @@ storiesOf('Tooltip', module)
.add(
'custom icon',
() => (
<div style={{ marginTop: '2rem' }}>
<div style={containerStyles}>
<Tooltip {...props.customIcon()}>
<p>
This is some tooltip text. This box shows the maximum amount of text
Expand Down Expand Up @@ -178,7 +183,7 @@ storiesOf('Tooltip', module)
.add(
'only custom icon',
() => (
<div style={{ marginTop: '2rem' }}>
<div style={containerStyles}>
<Tooltip {...props.customIconOnly()}>
<p>
This is some tooltip text. This box shows the maximum amount of text
Expand Down