import type { Meta, StoryObj } from '@storybook/react'; import { action } from 'storybook/actions'; import React, { useState } from 'react'; import { Input } from '../Input'; import { Button } from '../../Button'; const meta: Meta = { title: 'Form/Generic input', component: Input, args: { placeholder: 'Type something here', onChange: (e) => { action('onChange')(e); }, }, }; export default meta; type Story = StoryObj; export const Default: Story = {}; export const Readonly: Story = { args: { isReadOnly: true, value: 'Readonly text', }, }; export const Disabled: Story = { args: { isDisabled: true, value: 'Disabled text', }, }; export const InADisabledFieldset: Story = { args: { value: 'Disabled text', }, render: (args) => (
), }; export const WithLeftAddon: Story = { args: { leftAddon: