"use client"; /* * Documentation: * Switch — https://app.subframe.com/f023064a5ca0/library?component=Switch_7a464794-9ea9-4040-b1de-5bfb2ce599d9 */ import React from "react"; import * as SubframeCore from "@subframe/core"; import * as SubframeUtils from "../../utils"; export interface ThumbProps extends React.ComponentProps { variant?: "off" | "on" | "disabled"; className?: string; } const Thumb = React.forwardRef(function Thumb( { variant = "off", className, ...otherProps }: ThumbProps, ref ) { return (
); }); export interface SwitchRootProps extends React.ComponentProps { disabled?: boolean; checked?: boolean; onCheckedChange?: (checked: boolean) => void; className?: string; } const SwitchRoot = React.forwardRef( function SwitchRoot( { disabled = false, checked = false, className, ...otherProps }: SwitchRootProps, ref ) { return (
); } ); export const Switch = Object.assign(SwitchRoot, { Thumb, });