// Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; import { storiesOf } from '@storybook/react'; import { select } from '@storybook/addon-knobs'; import { Tooltip, TooltipPlacement, TooltipTheme, PropsType } from './Tooltip'; const createProps = (overrideProps: Partial = {}): PropsType => ({ content: overrideProps.content || 'Hello World', direction: select('direction', TooltipPlacement, overrideProps.direction), sticky: overrideProps.sticky, theme: overrideProps.theme, }); const story = storiesOf('Components/Tooltip', module); const Trigger = ( Trigger ); story.add('Top', () => ( {Trigger} )); story.add('Right', () => ( {Trigger} )); story.add('Bottom', () => ( {Trigger} )); story.add('Left', () => ( {Trigger} )); story.add('Sticky', () => ( {Trigger} )); story.add('Dark Theme', () => ( {Trigger} ));