2026-02-02 18:46:27 +00:00
|
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
|
|
|
import { HelpText } from './HelpText';
|
|
|
|
|
|
2026-02-12 23:32:08 +00:00
|
|
|
const meta: Meta = {
|
2026-02-02 18:46:27 +00:00
|
|
|
title: 'UI/HelpText',
|
|
|
|
|
component: HelpText,
|
|
|
|
|
tags: ['autodocs'],
|
|
|
|
|
argTypes: {
|
|
|
|
|
text: { control: 'text' },
|
|
|
|
|
position: {
|
|
|
|
|
control: 'select',
|
|
|
|
|
options: ['top', 'bottom', 'left', 'right'],
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-02-12 23:32:08 +00:00
|
|
|
};
|
2026-02-02 18:46:27 +00:00
|
|
|
|
|
|
|
|
export default meta;
|
|
|
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
|
|
|
|
|
|
export const Default: Story = {
|
|
|
|
|
args: {
|
|
|
|
|
text: 'This is a helpful tooltip message.',
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const InlineExample: Story = {
|
|
|
|
|
render: () => (
|
|
|
|
|
<div className="flex items-center gap-2">
|
2026-02-12 01:09:29 +00:00
|
|
|
<span className="text-sm font-medium text-foreground">Password</span>
|
2026-03-12 05:13:38 +00:00
|
|
|
<HelpText text="Must be at least 12 characters long." />
|
2026-02-02 18:46:27 +00:00
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
};
|