insomnia/packages/insomnia-components/components/help-tooltip.stories.js
Mike Ellan 5780a7c438
Help Tooltip Component Migration (#2200)
* component migration to new SB instance

Migrating help tooltip to new SB instance at /insomnia-components/ also styling component directly via styled components

* Adding stories for positions and info vs. question

* lint fix

* Pulling left positioning out of delay story

Co-authored-by: Gregory Schier <gschier1990@gmail.com>
2020-05-21 14:17:14 -04:00

44 lines
1.0 KiB
JavaScript

import React from 'react';
import HelpTooltip from './help-tooltip';
export default { title: 'Helpers | Help Tooltip' };
export const _question = () => (
<div>
Hover over the question mark to view <HelpTooltip>This is the help message</HelpTooltip>
</div>
);
export const _info = () => (
<div>
Hover over the info mark to view <HelpTooltip info>This is the help message</HelpTooltip>
</div>
);
export const _onTop = () => (
<div>
Hover over the info mark to view <HelpTooltip info>This is the help message</HelpTooltip>
</div>
);
export const _onRight = () => (
<div>
Hover over the info mark to view
<HelpTooltip position="right">This is the help message</HelpTooltip>
</div>
);
export const _onLeft = () => (
<div>
Hover over the info mark to view
<HelpTooltip position="left">This is the help message</HelpTooltip>
</div>
);
export const _withDelay = () => (
<div>
Hover over the info mark to view
<HelpTooltip delay={900}> This tooltip had a 900ms delay</HelpTooltip>
</div>
);