import { motion } from "framer-motion"; import "./Switch.css"; import type { SwitchProps } from "../types/SwitchProps"; import { memo } from "react"; function Switch(props: SwitchProps) { const toggleSwitch = () => { const newIsOn = !props.state; props.onChange(newIsOn); }; return (
); } const spring = { type: "spring", stiffness: 700, damping: 30 }; export default memo(Switch);