Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add storybook story to the Tooltip component
- Loading branch information
1 parent
bd82bd4
commit 9fbd6b7
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { text } from '@storybook/addon-knobs'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import Tooltip from '../'; | ||
import Button from '../../button'; | ||
|
||
export default { | ||
title: 'Components/ToolTip', | ||
component: Tooltip, | ||
}; | ||
|
||
export const _default = () => { | ||
const tooltipText = text( 'Text', 'More information' ); | ||
return ( | ||
<Tooltip text={ tooltipText }> | ||
<Button isSecondary>Hover for more information</Button> | ||
</Tooltip> | ||
); | ||
}; |