Storybook Sidebar Provisioning & WIP Implementation (#2125)
* Migrating dimensions, latest SVG, stubbing sidebar
* Revert "Migrating dimensions, latest SVG, stubbing sidebar"
This reverts commit 5014a68f52ac50fc62db5d42d2b49abda28efaea.
* Revert "Revert "Migrating dimensions, latest SVG, stubbing sidebar""
This reverts commit 28c130c8d8b3993f91f072de106d3ff223d6c55b.
* Post merge bootstrap & build
* Linting
* Updating Story Heirarchy
* Migrating legacy tooltip component
* Reverting spacing integration into core dimensions
* Cleaning up comments, tweaking CSS var usage
* Removing static height
* Cleaning up static CSS values, re-organizing sliding panel, fixing search icon
* adding flow def for autobind in new SB instance
* PR feedback, removing new vars/updating markup
* Fixing lint > flow error on type
2020-05-14 18:00:29 +00:00
|
|
|
import React from 'react';
|
|
|
|
import Tooltip from './tooltip';
|
|
|
|
|
2020-07-29 20:54:09 +00:00
|
|
|
export default { title: 'Helpers | Tooltip' };
|
Storybook Sidebar Provisioning & WIP Implementation (#2125)
* Migrating dimensions, latest SVG, stubbing sidebar
* Revert "Migrating dimensions, latest SVG, stubbing sidebar"
This reverts commit 5014a68f52ac50fc62db5d42d2b49abda28efaea.
* Revert "Revert "Migrating dimensions, latest SVG, stubbing sidebar""
This reverts commit 28c130c8d8b3993f91f072de106d3ff223d6c55b.
* Post merge bootstrap & build
* Linting
* Updating Story Heirarchy
* Migrating legacy tooltip component
* Reverting spacing integration into core dimensions
* Cleaning up comments, tweaking CSS var usage
* Removing static height
* Cleaning up static CSS values, re-organizing sliding panel, fixing search icon
* adding flow def for autobind in new SB instance
* PR feedback, removing new vars/updating markup
* Fixing lint > flow error on type
2020-05-14 18:00:29 +00:00
|
|
|
|
|
|
|
export const onTop = () => (
|
|
|
|
<div className="text-center">
|
|
|
|
<Tooltip message="Here is some extra info on top" position="top">
|
|
|
|
<button className="btn btn--clicky">Hover Me</button>
|
|
|
|
</Tooltip>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
export const onRight = () => (
|
|
|
|
<div className="text-center">
|
|
|
|
<Tooltip message="Here is some extra info on the right" position="right">
|
|
|
|
<button className="btn btn--clicky">Hover Me</button>
|
|
|
|
</Tooltip>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
export const onLeft = () => (
|
|
|
|
<div className="text-center">
|
|
|
|
<Tooltip message="Here is some extra info on the left" position="left">
|
|
|
|
<button className="btn btn--clicky">Hover Me</button>
|
|
|
|
</Tooltip>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
export const withDelay = () => (
|
|
|
|
<div className="text-center">
|
|
|
|
<Tooltip message="This tooltip had a 900ms delay" delay={900}>
|
|
|
|
<button className="btn btn--clicky">Hover Me</button>
|
|
|
|
</Tooltip>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
export const withChildren = () => {
|
|
|
|
const message = (
|
|
|
|
<React.Fragment>
|
|
|
|
This is a{' '}
|
|
|
|
<a href="#" onClick={e => e.preventDefault()}>
|
|
|
|
Link
|
|
|
|
</a>
|
|
|
|
.
|
|
|
|
</React.Fragment>
|
|
|
|
);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="text-center">
|
|
|
|
<Tooltip message={message}>
|
|
|
|
<button className="btn btn--clicky">Hover Me</button>
|
|
|
|
</Tooltip>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|