mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-29 23:55:02 +00:00
25 lines
673 B
TypeScript
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>
|
|
)
|
|
}
|