import React, { useState } from 'react'; import type { Meta, StoryObj } from '@storybook/react-vite'; import { Time } from '@internationalized/date'; import { Button } from '../Button/Button.quanta'; import { TimeField } from './TimeField.quanta'; // TimeField Stories const meta = { title: 'Quanta/TimeField', component: TimeField, parameters: { layout: 'centered', backgrounds: { disable: true }, }, tags: ['autodocs'], args: { label: 'Time', }, } satisfies Meta; export default meta; type Story = StoryObj; // Basic Stories export const Default: Story = { render: (args) => , args: { name: 'time', label: 'Select time', description: 'Basic time field for selecting hours and minutes', }, }; export const WithDefaultValue: Story = { render: (args) => , args: { name: 'time-default', label: 'Meeting time', description: 'Time field with default value', defaultValue: new Time(14, 30), // 2:30 PM }, }; // Controlled Example const ControlledExample = (args: any) => { const [value, setValue] = useState