import { useId } from "@radix-ui/react-id"; import * as Label from "@radix-ui/react-label"; import * as PrimitiveSwitch from "@radix-ui/react-switch"; import React from "react"; import classNames from "@calcom/lib/classNames"; import { Tooltip } from "../../tooltip"; const Wrapper = ({ children, tooltip }: { tooltip?: string; children: React.ReactNode }) => { if (!tooltip) { return <>{children}; } return {children}; }; const Switch = ( props: React.ComponentProps & { label?: string; thumbProps?: { className?: string; }; fitToHeight?: boolean; tooltip?: string; } ) => { const { label, fitToHeight, ...primitiveProps } = props; const id = useId(); return (
{label && ( {label} )}
); }; export default Switch;