// Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import * as React from '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, }); export default { title: 'Components/Tooltip', }; const Trigger = ( Trigger ); export const _Top = (): JSX.Element => ( {Trigger} ); export const _Right = (): JSX.Element => ( {Trigger} ); export const _Bottom = (): JSX.Element => ( {Trigger} ); export const _Left = (): JSX.Element => ( {Trigger} ); export const Sticky = (): JSX.Element => ( {Trigger} ); export const WithAppliedPopperModifiers = (): JSX.Element => { return ( {Trigger} ); }; export const DarkTheme = (): JSX.Element => ( {Trigger} );