import type { Meta, StoryObj } from "@storybook/react"; import { DateField, } from "react-admin"; import { attributeName } from "../../../../ideExtension"; import { fieldDecorators } from "../fieldDecorators"; const meta = { title: "Fields/DateField", component: DateField, parameters: { layout: "centered", }, decorators: [...fieldDecorators], args: { source: "date" }, argTypes: { locales: { control: 'text', }, options: { control: 'text', }, showTime: { control: 'boolean', }, showDate: { control: 'boolean', }, transform: { control: 'text', }, } } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { render: ({source, ...props}) => { return ; }, }; export const Custom: Story = { render: ({ showTime, locales, source, ...props }) => { return ( ); }, args: { showTime: true, locales: "en-US", }, argTypes: { locales: { options: ["fr-FR", "en-US"], control: { type: "select" }, }, }, };