@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
38 lines (37 loc) • 1.32 kB
TypeScript
import { Merge } from "../../utils/index.js";
import { ThemeProps } from "../../core/system/index.types.js";
import { Component, HTMLStyledProps } from "../../core/components/index.types.js";
import "../../core/index.js";
import { SwitchStyle } from "./switch.style.js";
import { UseSwitchProps } from "./use-switch.js";
import "../../index.js";
import * as react2658 from "react";
import { ReactNode } from "react";
//#region src/components/switch/switch.d.ts
interface SwitchProps extends Merge<HTMLStyledProps<"label">, UseSwitchProps>, ThemeProps<SwitchStyle> {
/**
* The switch icon to use.
*/
icon?: ReactNode | {
off: ReactNode;
on: ReactNode;
};
/**
* Props for switch input element.
*/
inputProps?: HTMLStyledProps<"input">;
/**
* Props for switch label element.
*/
labelProps?: HTMLStyledProps<"span">;
}
declare const SwitchPropsContext: react2658.Context<Partial<SwitchProps> | undefined>, useSwitchPropsContext: () => Partial<SwitchProps> | undefined;
/**
* `Switch` is a component used to toggle between on and off states.
*
* @see https://yamada-ui.com/docs/components/switch
*/
declare const Switch: Component<"input", SwitchProps>;
//#endregion
export { Switch, SwitchProps, SwitchPropsContext, useSwitchPropsContext };
//# sourceMappingURL=switch.d.ts.map