mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 12:55:06 +03:00
* feat(ui): add Field component * feat(design-system): add Field documentation
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import { Input } from 'ui'
|
|
import {
|
|
FieldSet,
|
|
FieldLegend,
|
|
FieldDescription,
|
|
Field,
|
|
FieldLabel,
|
|
FieldGroup,
|
|
} from 'ui/src/components/shadcn/ui/field'
|
|
|
|
export default function FieldFieldset() {
|
|
return (
|
|
<div className="w-full max-w-md space-y-6">
|
|
<FieldSet>
|
|
<FieldLegend>Address Information</FieldLegend>
|
|
<FieldDescription>We need your address to deliver your order.</FieldDescription>
|
|
<FieldGroup>
|
|
<Field>
|
|
<FieldLabel htmlFor="street">Street Address</FieldLabel>
|
|
<Input id="street" type="text" placeholder="123 Main St" />
|
|
</Field>
|
|
<div className="grid grid-cols-2 gap-4">
|
|
<Field>
|
|
<FieldLabel htmlFor="city">City</FieldLabel>
|
|
<Input id="city" type="text" placeholder="New York" />
|
|
</Field>
|
|
<Field>
|
|
<FieldLabel htmlFor="zip">Postal Code</FieldLabel>
|
|
<Input id="zip" type="text" placeholder="90502" />
|
|
</Field>
|
|
</div>
|
|
</FieldGroup>
|
|
</FieldSet>
|
|
</div>
|
|
)
|
|
}
|