Files
frontend/packages/common/components/src/ui/switch/index.tsx
T
2025-02-21 20:32:47 +09:00

17 lines
475 B
TypeScript

import "./switch.css";
import * as React from "react";
import * as SwitchPrimitives from "@radix-ui/react-switch";
const Switch = React.forwardRef<
React.ElementRef<typeof SwitchPrimitives.Root>,
React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
>(({ ...props }, ref) => (
<SwitchPrimitives.Root {...props} ref={ref}>
<SwitchPrimitives.Thumb />
</SwitchPrimitives.Root>
));
Switch.displayName = SwitchPrimitives.Root.displayName;
export { Switch };