import React, { useRef, useState } from 'react' import type { Story } from '@storybook/react' import Component from '../Popover' import Input from '../../Input' import type { PopoverProps } from '../Popover' import mdx from './Popover.mdx' import type { ComponentArgTypes } from '../../../typings/utils' const PopoverTemplate: Story = ({ children }) => { const ref = useRef(null) const [value, setValue] = useState('') return (
{value.length > 0 && {children}}
) } export const Popover = PopoverTemplate.bind({}) Popover.args = { children: 'Whoa! Look at me!', } const argTypes: ComponentArgTypes> = { children: { table: { disable: true }, }, } export default { title: 'Atoms/Popover', argTypes, parameters: { docs: { page: mdx, }, }, }