UNPKG

@airplane/views

Version:

A React library for building Airplane views. Views components are optimized in style and functionality to produce internal apps that are easy to build and maintain.

43 lines (42 loc) 2.46 kB
import * as React from "react"; import { SwitchProps } from "./Switch.types"; export declare const useStyles: (params: void, options?: import("@mantine/core").UseStylesOptions<string> | undefined) => { classes: { label: string; }; cx: (...args: any) => string; theme: import("@mantine/core").MantineTheme; }; /** Presentational switch component */ export declare const SwitchComponent: React.ForwardRefExoticComponent<{ size?: import("@mantine/core").MantineSize | undefined; color?: import("../theme/colors").Color | undefined; label?: React.ReactNode; description?: React.ReactNode; checked?: boolean | undefined; onChange?: ((checked: boolean) => void) | undefined; error?: React.ReactNode; offLabel?: React.ReactNode; onLabel?: React.ReactNode; sx?: import("@mantine/core").CSSObject | undefined; } & import("../styling.types").CommonStylingProps & Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "error" | "color" | "ref" | "size" | "sx" | "label" | "onChange" | keyof import("../styling.types").CommonStylingProps | "checked" | "description" | "offLabel" | "onLabel"> & React.RefAttributes<HTMLInputElement>>; export declare const Switch: React.ForwardRefExoticComponent<{ id?: string | undefined; defaultDisabled?: boolean | undefined; defaultChecked?: boolean | undefined; } & import("../../state/components/input/types").InputProps<boolean, boolean> & { size?: import("@mantine/core").MantineSize | undefined; color?: import("../theme/colors").Color | undefined; label?: React.ReactNode; description?: React.ReactNode; checked?: boolean | undefined; onChange?: ((checked: boolean) => void) | undefined; error?: React.ReactNode; offLabel?: React.ReactNode; onLabel?: React.ReactNode; sx?: import("@mantine/core").CSSObject | undefined; } & import("../styling.types").CommonStylingProps & Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "error" | "color" | "ref" | "size" | "sx" | "label" | "onChange" | keyof import("../styling.types").CommonStylingProps | "checked" | "description" | "offLabel" | "onLabel"> & React.RefAttributes<HTMLInputElement>>; /** Exported for documentation purposes */ export declare const SwitchWithoutRef: (props: SwitchProps & { innerRef: React.Ref<HTMLInputElement>; }) => import("react/jsx-runtime").JSX.Element;