snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
39
apps/v4/examples/base/switch-choice-card.tsx
Normal file
39
apps/v4/examples/base/switch-choice-card.tsx
Normal file
@@ -0,0 +1,39 @@
|
||||
import {
|
||||
Field,
|
||||
FieldContent,
|
||||
FieldDescription,
|
||||
FieldGroup,
|
||||
FieldLabel,
|
||||
FieldTitle,
|
||||
} from "@/styles/base-nova/ui/field"
|
||||
import { Switch } from "@/styles/base-nova/ui/switch"
|
||||
|
||||
export function SwitchChoiceCard() {
|
||||
return (
|
||||
<FieldGroup className="w-full max-w-sm">
|
||||
<FieldLabel htmlFor="switch-share">
|
||||
<Field orientation="horizontal">
|
||||
<FieldContent>
|
||||
<FieldTitle>Share across devices</FieldTitle>
|
||||
<FieldDescription>
|
||||
Focus is shared across devices, and turns off when you leave the
|
||||
app.
|
||||
</FieldDescription>
|
||||
</FieldContent>
|
||||
<Switch id="switch-share" />
|
||||
</Field>
|
||||
</FieldLabel>
|
||||
<FieldLabel htmlFor="switch-notifications">
|
||||
<Field orientation="horizontal">
|
||||
<FieldContent>
|
||||
<FieldTitle>Enable notifications</FieldTitle>
|
||||
<FieldDescription>
|
||||
Receive notifications when focus mode is enabled or disabled.
|
||||
</FieldDescription>
|
||||
</FieldContent>
|
||||
<Switch id="switch-notifications" defaultChecked />
|
||||
</Field>
|
||||
</FieldLabel>
|
||||
</FieldGroup>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user