import React from 'react'; import { Box } from './primitives/Box'; import { Text } from './Text'; import { motion } from 'framer-motion'; interface ToggleProps { label: string; description?: string; checked: boolean; onChange: (checked: boolean) => void; disabled?: boolean; } export function Toggle({ label, description, checked, onChange, disabled }: ToggleProps) { return ( {label} {description && ( {description} )} !disabled && onChange(!checked)} disabled={disabled} w="12" h="6" rounded="full" transition="all 0.2s" flexShrink={0} ring="primary-blue/50" bg={checked ? 'bg-primary-blue/20' : 'bg-charcoal-outline'} className="focus:outline-none focus:ring-2" > ); }