import React from 'react'; import type { Meta, StoryObj } from '@storybook/react-vite'; import { TextInput } from '../Inputs/TextInput/TextInput'; import { Field } from './Field'; const meta: Meta = { title: 'UI kit/Form/Field', component: Field, tags: ['autodocs'], }; export default meta; type Story = StoryObj; export const Default: Story = { render: args => (
Full name
), }; export const Required: Story = { render: args => (
Email address
), args: { required: true, }, }; export const WithHint: Story = { render: args => (
Password
), }; export const WithWarning: Story = { render: args => (
Username
), }; export const WithError: Story = { render: args => (
Email address
), args: { invalid: true, }, }; export const Disabled: Story = { render: args => (
Company name
), args: { disabled: true, }, }; export const ReadOnly: Story = { render: args => (
Account ID
), args: { readOnly: true, }, }; export const WithTooltip: Story = { render: args => (
VAT number
), args: { tooltip: 'The VAT identification number assigned by your tax authority.', }, }; export const FullWidth: Story = { render: args => (
Description
), args: { isFullWidth: true, }, }; export const Justified: Story = { render: args => (
Description
), args: {}, };