import type { Meta, StoryObj } from '@storybook/react'; import { Timeline, TimelineItem, TimelineDot, TimelineContent, TimelineHeading, TimelineTime, TimelineDescription, } from './timeline'; import { CheckCircle, AlertCircle, LogIn, Mail } from 'lucide-react'; import React from 'react'; type TimelineStoryProps = React.ComponentProps & { firstItemHeading?: string; firstItemDescription?: string; dotVariant?: 'default' | 'primary' | 'success' | 'info' | 'warning' | 'destructive' | 'outline'; }; const meta: Meta = { title: 'UI/Timeline', component: Timeline, render: args => , argTypes: { dotVariant: { control: 'select', options: ['default', 'primary', 'success', 'info', 'warning', 'destructive', 'outline'], description: 'Variant of the first TimelineDot.', defaultValue: 'default', table: { category: 'TimelineDot' }, }, firstItemHeading: { control: 'text', description: 'The heading for the first timeline item.', defaultValue: 'Login', }, firstItemDescription: { control: 'text', description: 'The description for the first timeline item.', defaultValue: 'User logged in from Chrome on macOS', }, }, }; export default meta; type Story = StoryObj; export const Default: Story = { args: { dotVariant: 'default', firstItemHeading: 'Login', firstItemDescription: 'User logged in from Chrome on macOS', }, render: ({ firstItemHeading, firstItemDescription, dotVariant, ...args }) => (
} /> {firstItemHeading} Today, 09:00 {firstItemDescription} } /> Password Changed Yesterday, 16:32 User changed their account password } /> Security Alert Mon, 10:15 Suspicious login attempt blocked from unknown IP } /> Email Verified Last Friday New email address successfully verified
), };