mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-07 22:18:39 +00:00
54 lines
1.6 KiB
TypeScript
54 lines
1.6 KiB
TypeScript
"use client"
|
|
|
|
import { Checkbox } from "@/styles/base-nova/ui/checkbox"
|
|
import {
|
|
Field,
|
|
FieldContent,
|
|
FieldDescription,
|
|
FieldGroup,
|
|
FieldLabel,
|
|
FieldTitle,
|
|
} from "@/styles/base-nova/ui/field"
|
|
import { Label } from "@/styles/base-nova/ui/label"
|
|
|
|
export default function CheckboxDemo() {
|
|
return (
|
|
<FieldGroup className="max-w-sm">
|
|
<Field orientation="horizontal">
|
|
<Checkbox id="terms-checkbox" name="terms-checkbox" />
|
|
<Label htmlFor="terms-checkbox">Accept terms and conditions</Label>
|
|
</Field>
|
|
<Field orientation="horizontal">
|
|
<Checkbox
|
|
id="terms-checkbox-2"
|
|
name="terms-checkbox-2"
|
|
defaultChecked
|
|
/>
|
|
<FieldContent>
|
|
<FieldLabel htmlFor="terms-checkbox-2">
|
|
Accept terms and conditions
|
|
</FieldLabel>
|
|
<FieldDescription>
|
|
By clicking this checkbox, you agree to the terms.
|
|
</FieldDescription>
|
|
</FieldContent>
|
|
</Field>
|
|
<Field orientation="horizontal" data-disabled>
|
|
<Checkbox id="toggle-checkbox" name="toggle-checkbox" disabled />
|
|
<FieldLabel htmlFor="toggle-checkbox">Enable notifications</FieldLabel>
|
|
</Field>
|
|
<FieldLabel>
|
|
<Field orientation="horizontal">
|
|
<Checkbox id="toggle-checkbox-2" name="toggle-checkbox-2" />
|
|
<FieldContent>
|
|
<FieldTitle>Enable notifications</FieldTitle>
|
|
<FieldDescription>
|
|
You can enable or disable notifications at any time.
|
|
</FieldDescription>
|
|
</FieldContent>
|
|
</Field>
|
|
</FieldLabel>
|
|
</FieldGroup>
|
|
)
|
|
}
|