// 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 type { PropsType } from './Tooltip'; import { Tooltip, TooltipPlacement } from './Tooltip'; import { Theme } from '../util/theme'; 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('With Applied Popper Modifiers', () => { return ( {Trigger} ); }); story.add('Dark Theme', () => ( {Trigger} ));