mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 21:05:06 +03:00
* feat(ui): add Field component * feat(design-system): add Field documentation
55 lines
1.7 KiB
TypeScript
55 lines
1.7 KiB
TypeScript
import { Checkbox_Shadcn_ as Checkbox } from 'ui'
|
|
import {
|
|
FieldGroup,
|
|
FieldSet,
|
|
FieldLabel,
|
|
FieldDescription,
|
|
Field,
|
|
FieldSeparator,
|
|
} from 'ui/src/components/shadcn/ui/field'
|
|
|
|
export default function FieldGroupExample() {
|
|
return (
|
|
<div className="w-full max-w-md">
|
|
<FieldGroup>
|
|
<FieldSet>
|
|
<FieldLabel>Responses</FieldLabel>
|
|
<FieldDescription>
|
|
Get notified when ChatGPT responds to requests that take time, like research or image
|
|
generation.
|
|
</FieldDescription>
|
|
<FieldGroup data-slot="checkbox-group">
|
|
<Field orientation="horizontal">
|
|
<Checkbox id="push" defaultChecked disabled />
|
|
<FieldLabel htmlFor="push" className="font-normal">
|
|
Push notifications
|
|
</FieldLabel>
|
|
</Field>
|
|
</FieldGroup>
|
|
</FieldSet>
|
|
<FieldSeparator />
|
|
<FieldSet>
|
|
<FieldLabel>Tasks</FieldLabel>
|
|
<FieldDescription>
|
|
Get notified when tasks you've created have updates. <a href="/">Manage tasks</a>
|
|
</FieldDescription>
|
|
<FieldGroup data-slot="checkbox-group">
|
|
<Field orientation="horizontal">
|
|
<Checkbox id="push-tasks" />
|
|
<FieldLabel htmlFor="push-tasks" className="font-normal">
|
|
Push notifications
|
|
</FieldLabel>
|
|
</Field>
|
|
<Field orientation="horizontal">
|
|
<Checkbox id="email-tasks" />
|
|
<FieldLabel htmlFor="email-tasks" className="font-normal">
|
|
Email notifications
|
|
</FieldLabel>
|
|
</Field>
|
|
</FieldGroup>
|
|
</FieldSet>
|
|
</FieldGroup>
|
|
</div>
|
|
)
|
|
}
|