mirror of
https://github.com/hanzoai/o11y-components.git
synced 2026-10-30 14:54:15 +00:00
A version written into a manifest is written into every manifest that wants it, which is how eslint came to exist in a hundred and four forms across this estate and how a package came to resolve twice at run time. The catalog moves the number out of the manifest: a manifest names the package, the workspace names the version. Four are held below their latest because the newer release cannot be used, and the reason is recorded rather than the version alone: @noble/hashes 2 renamed every subpath the web3 stack imports, @splinetool/runtime 2 depends on a package that was never published, @dynamic-labs 5.4.1 the same, and react-resizable-panels 3 points its types condition at the bundle.
82 lines
2.0 KiB
TypeScript
82 lines
2.0 KiB
TypeScript
import { Button, ButtonColor, ButtonVariant, TooltipProvider, TooltipSimple } from '@signozhq/ui';
|
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
|
|
const meta: Meta<typeof TooltipProvider> = {
|
|
title: 'Primitive Components/Tooltip/TooltipProvider',
|
|
component: TooltipProvider,
|
|
argTypes: {
|
|
delayDuration: {
|
|
control: 'number',
|
|
description:
|
|
'The duration from when the pointer enters the trigger until the tooltip gets opened.',
|
|
table: {
|
|
category: 'Behavior',
|
|
type: { summary: 'number' },
|
|
defaultValue: { summary: '700' },
|
|
},
|
|
},
|
|
skipDelayDuration: {
|
|
control: 'number',
|
|
description:
|
|
'How much time a user has to enter another trigger without incurring a delay again.',
|
|
table: {
|
|
category: 'Behavior',
|
|
type: { summary: 'number' },
|
|
defaultValue: { summary: '300' },
|
|
},
|
|
},
|
|
disableHoverableContent: {
|
|
control: 'boolean',
|
|
description:
|
|
'When true, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.',
|
|
table: {
|
|
category: 'Behavior',
|
|
type: { summary: 'boolean' },
|
|
defaultValue: { summary: 'false' },
|
|
},
|
|
},
|
|
testId: {
|
|
control: 'text',
|
|
description: 'The test id of the tooltip provider.',
|
|
table: { category: 'Testing', type: { summary: 'string' } },
|
|
},
|
|
},
|
|
parameters: {
|
|
layout: 'fullscreen',
|
|
},
|
|
tags: ['autodocs'],
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof TooltipProvider>;
|
|
|
|
export const Default: Story = {
|
|
args: {
|
|
delayDuration: 0,
|
|
},
|
|
render: (args) => (
|
|
<TooltipProvider {...args}>
|
|
<div
|
|
style={{
|
|
padding: 80,
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
gap: 16,
|
|
}}
|
|
>
|
|
<TooltipSimple title="First tooltip">
|
|
<Button variant={ButtonVariant.Solid} color={ButtonColor.Secondary}>
|
|
Hover me
|
|
</Button>
|
|
</TooltipSimple>
|
|
<TooltipSimple title="Second tooltip">
|
|
<Button variant={ButtonVariant.Solid} color={ButtonColor.Secondary}>
|
|
Or me
|
|
</Button>
|
|
</TooltipSimple>
|
|
</div>
|
|
</TooltipProvider>
|
|
),
|
|
};
|