diff --git a/ui/src/shared/components/Tooltip.js b/ui/src/shared/components/Tooltip.js new file mode 100644 index 0000000000..d8d0205528 --- /dev/null +++ b/ui/src/shared/components/Tooltip.js @@ -0,0 +1,21 @@ +import React, {PropTypes} from 'react' +import ReactTooltip from 'react-tooltip' + +const Tooltip = ({tip, children}) => ( +
+
{children}
+ +
+) + +const { + shape, + string, +} = PropTypes + +Tooltip.propTypes = { + tip: string, + children: shape({}), +} + +export default Tooltip diff --git a/ui/stories/admin.js b/ui/stories/admin.js index 2d0101e008..dfc2715d66 100644 --- a/ui/stories/admin.js +++ b/ui/stories/admin.js @@ -1,22 +1,38 @@ import React from 'react' import {storiesOf, action, linkTo} from '@kadira/storybook' +import Center from './components/Center' + import MultiSelectDropdown from 'shared/components/MultiSelectDropdown' +import Tooltip from 'shared/components/Tooltip' storiesOf('MultiSelectDropdown', module) .add('Select Roles', () => ( - +
+ +
+ )) + +storiesOf('Tooltip', module) + .add('Delete', () => ( +
+ +
+ Delete +
+
+
)) diff --git a/ui/stories/components/Center.js b/ui/stories/components/Center.js new file mode 100644 index 0000000000..e955c0c191 --- /dev/null +++ b/ui/stories/components/Center.js @@ -0,0 +1,14 @@ +import React from 'react' + +const Center = ({children}) => ( +
+ {children} +
+) + +export default Center