import { useState } from 'react'
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Select } from './Select'
import { TextInput } from './TextInput'
const meta = {
title: 'Inputs/TextInput',
component: TextInput,
parameters: { layout: 'padded' },
args: { placeholder: 'What is this about?' },
// Inputs stretch to fill their container (as inside a Field).
decorators: [(Story) =>
],
} satisfies Meta
export default meta
type Story = StoryObj
export const Empty: Story = {}
export const Filled: Story = { args: { defaultValue: 'Q3 launch planning' } }
export const Disabled: Story = { args: { defaultValue: 'Read only', disabled: true } }
/** 24px and 12px text — the small `Select`'s size, for a dense row. */
export const Small: Story = { args: { size: 'small', placeholder: 'Label…' } }
function DenseRow() {
const [first, setFirst] = useState('one')
const [second, setSecond] = useState('a')
return (
)
}
/** Beside two small selects, in one row: the three are the same height, and the text sits on one line. */
export const BesideSmallSelects: Story = {
parameters: { controls: { disable: true } },
render: () => ,
}