Files
supabase/apps/design-system/registry/default/example/field-select.tsx
Francesco Sansalvadore f42760e2d1 feat(design-system): add Field component and docs (#41162)
* feat(ui): add Field component
* feat(design-system): add Field documentation
2025-12-09 09:47:46 +01:00

35 lines
1.2 KiB
TypeScript

import { Field, FieldLabel, FieldDescription } from 'ui/src/components/shadcn/ui/field'
import {
Select,
SelectTrigger,
SelectValue,
SelectContent,
SelectItem,
} from 'ui/src/components/shadcn/ui/select'
export default function FieldSelect() {
return (
<div className="w-full max-w-md">
<Field>
<FieldLabel>Department</FieldLabel>
<Select>
<SelectTrigger>
<SelectValue placeholder="Choose department" />
</SelectTrigger>
<SelectContent>
<SelectItem value="engineering">Engineering</SelectItem>
<SelectItem value="design">Design</SelectItem>
<SelectItem value="marketing">Marketing</SelectItem>
<SelectItem value="sales">Sales</SelectItem>
<SelectItem value="support">Customer Support</SelectItem>
<SelectItem value="hr">Human Resources</SelectItem>
<SelectItem value="finance">Finance</SelectItem>
<SelectItem value="operations">Operations</SelectItem>
</SelectContent>
</Select>
<FieldDescription>Select your department or area of work.</FieldDescription>
</Field>
</div>
)
}