MCPcopy
hub / github.com/intentui/intentui / SwitchField

Function SwitchField

src/components/ui/switch.tsx:11–23  ·  view source on GitHub ↗
({ className, ...props }: SwitchFieldProps)

Source from the content-addressed store, hash-verified

9import { cx } from '@/lib/primitive'
10
11export function SwitchField({ className, ...props }: SwitchFieldProps) {
12 return (
13 <SwitchFieldPrimitive
14 {...props}
15 data-slot="control"
16 className={cx('has-[[slot=description]]:**:data-[slot=control-label]:font-medium', className)}
17 style={({ defaultStyle }) => ({
18 ...defaultStyle,
19 WebkitTapHighlightColor: 'transparent',
20 })}
21 />
22 )
23}
24
25export function Switch({ children, className, ...props }: SwitchButtonProps) {
26 return (

Callers

nothing calls this directly

Calls 1

cxFunction · 0.90

Tested by

no test coverage detected