veza/apps/web/src/components/ui/FloatingInput.stories.tsx
senke be2854ec7c feat(storybook): complete UI component coverage (batches 6-9)
- Batch 6: FAB, FormField, FloatingInput, AvatarUpload
- Batch 7: Modal, ConfirmationDialog, ImageViewerModal, ErrorDisplay, LoadingState
- Batch 8: DataList, WaveformVisualizer, OptimizedImage, VirtualizedList
- Batch 9: ImageCropper, LoadingSpinner, FocusTrap
- Achieved total coverage for src/components/ui
2026-02-02 19:50:45 +01:00

41 lines
947 B
TypeScript

import type { Meta, StoryObj } from '@storybook/react';
import { FloatingInput } from './floating-input';
import { Mail, Lock } from 'lucide-react';
const meta = {
title: 'UI/FloatingInput',
component: FloatingInput,
tags: ['autodocs'],
argTypes: {
label: { control: 'text' },
error: { control: 'text' },
},
} satisfies Meta<typeof FloatingInput>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
args: {
label: 'Email Address',
type: 'email',
},
};
export const WithIcon: Story = {
args: {
label: 'Password',
type: 'password',
icon: <Lock className="w-5 h-5" />,
},
};
export const WithError: Story = {
args: {
label: 'Email Address',
type: 'email',
icon: <Mail className="w-5 h-5" />,
value: 'invalid-email',
error: 'Please enter a valid email address',
},
};