material-you-react
Version:
Material You: Material You (M3) Design system and its components for simple integration with Next.Js or other react-based frameworks
18 lines (17 loc) • 654 B
TypeScript
import React from "react";
type SwitchProps<T = void> = {
mode: "ON" | "OFF";
offIcon?: boolean;
onIcon?: boolean;
disable?: boolean;
onClickCallback: (params: T) => void;
};
/**
* Switch is used to toggle.
* @params {'ON' | 'OFF'} `mode`: says wheather the toggle is on or off state.
* @params {boolean} `offIcon` : The close icon to me shown when toggle is off.
* @params {boolean} `onIcon` : The Check icon to me shown when toggle is on.
* @params {() => void} `onClickCallback` : A callback function hits when user toggle's.
*/
declare const Switch: <T>(props: SwitchProps<T>) => React.JSX.Element;
export default Switch;