import type { Meta, StoryObj } from '@storybook/html'; import { Tooltip, type TooltipOptions } from '@42/core/tooltip'; import '@42/styles/tooltip.css'; import '@42/styles/button.css'; const meta: Meta = { title: 'Core/Overlays/Tooltip', tags: ['autodocs'], argTypes: { placement: { control: 'select', options: ['top', 'right', 'bottom', 'left'], }, offset: { control: 'number' }, openDelay: { control: 'number' }, }, args: { placement: 'top', offset: 8, openDelay: 0 }, render: (args) => { const root = document.createElement('span'); root.dataset.c42Tooltip = ''; root.innerHTML = `
Headless tooltip positioned with floating-ui
`; new Tooltip(root, args); return root; }, }; export default meta; type Story = StoryObj; export const Default: Story = {}; export const Bottom: Story = { args: { placement: 'bottom' } };