File: /var/www/design.system/src/molecules/Inputs/Input/Input.stories.tsx
import { Meta, StoryFn, StoryObj } from '@storybook/react';
import Input from './Input.tsx';
import { useState } from 'react';
const meta: Meta<typeof Input> = {
component: Input,
title: 'Molecules/Inputs/Input',
tags: ['autodocs'],
};
export default meta;
const Template: StoryFn<typeof Input> = (args) => {
const [value, setValue] = useState('');
return <Input {...args} value={value} onChange={(value) => setValue(value)} />;
};
type Story = StoryObj<typeof Input>;
export const Default: Story = Template.bind({});
Default.args = {
label: 'Label',
placeholder: 'Value',
};