MCPcopy Create free account
hub / github.com/cloudflare/meet / Toggle

Function Toggle

app/components/Toggle.tsx:5–32  ·  view source on GitHub ↗
({ className, ...rest })

Source from the content-addressed store, hash-verified

3import { cn } from '~/utils/style'
4
5export const Toggle: FC<RadixSwitch.SwitchProps> = ({ className, ...rest }) => (
6 <RadixSwitch.Root
7 className={cn(
8 'w-11',
9 'h-6',
10 'bg-zinc-600',
11 'rounded-full',
12 'relative',
13 'data-[state=checked]:bg-orange-400',
14 className
15 )}
16 {...rest}
17 >
18 <RadixSwitch.Thumb
19 className={cn(
20 'block',
21 'w-5',
22 'h-5',
23 'bg-white',
24 'rounded-full',
25 'shadow-zinc-900/70',
26 'transition-transform',
27 'translate-x-[2px]',
28 'data-[state=checked]:translate-x-[22px]'
29 )}
30 />
31 </RadixSwitch.Root>
32)

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected