Files
shadcn-ui/apps/v4/examples/base/field-switch.tsx
shadcn 62aef1117f fix
2026-01-08 21:27:27 +04:00

25 lines
673 B
TypeScript

import {
Field,
FieldContent,
FieldDescription,
FieldLabel,
} from "@/examples/base/ui/field"
import { Switch } from "@/examples/base/ui/switch"
export default function FieldSwitch() {
return (
<div className="w-full max-w-md">
<Field orientation="horizontal">
<FieldContent>
<FieldLabel htmlFor="2fa">Multi-factor authentication</FieldLabel>
<FieldDescription>
Enable multi-factor authentication. If you do not have a two-factor
device, you can use a one-time code sent to your email.
</FieldDescription>
</FieldContent>
<Switch id="2fa" />
</Field>
</div>
)
}