UNPKG

@navinc/base-react-components

Version:
42 lines (36 loc) 2.6 kB
import { InferComponentProps } from './types.js'; import { IconName } from './icons/index.js'; declare const ToggleIndicator: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types.js").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>>, never>, never>> & string; type ToggleProps = { checked?: boolean; disabled?: boolean; color?: string; icon?: IconName; labelPosition?: 'left' | 'right'; label?: string; togglePosition?: 'left' | 'right'; } & InferComponentProps<typeof ToggleIndicator>; /** * @deprecated use the wayfinder toggle from @navinc/base-react-components/wayfinder instead # Toggle Displays a toggle switch using an html checkbox. ### Props Optional - **checked** (boolean): The checked state of the toggle. - **disabled** (boolean): Prevent modifying current checked state of toggle. - **color** (string): Custom color of toggle background when in the 'enabled' state. Defaults to theme color if not provided. - **icon** (Icon): Icon name to display in the toggle. - **labelPosition** ('left' | 'right'): Put the text on the left or right of the toggle button. - **togglePosition** ('left' | 'right'): Put the toggle on the left or right of containing div. - **label** (string): Text to display on the left or right of the toggle. **/ export declare const Toggle: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<{ checked?: boolean; disabled?: boolean; color?: string; icon?: IconName; labelPosition?: "left" | "right"; label?: string; togglePosition?: "left" | "right"; } & InferComponentProps<import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types.js").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>>, never>, never>> & string>, never>> & string & Omit<({ checked, disabled, color, icon, labelPosition, label, togglePosition, ...props }: ToggleProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>; export {};