packages/react-components/react-switch/library/etc/react-switch.api.md
Do not edit this file. It is a report generated by API Extractor.
import type { ComponentProps } from '@fluentui/react-utilities';
import type { ComponentState } from '@fluentui/react-utilities';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import type { JSXElement } from '@fluentui/react-utilities';
import { Label } from '@fluentui/react-label';
import * as React_2 from 'react';
import type { Slot } from '@fluentui/react-utilities';
import type { SlotClassNames } from '@fluentui/react-utilities';
// @public
export const renderSwitch_unstable: (state: SwitchState) => JSXElement;
// @public
export const Switch: ForwardRefComponent<SwitchProps>;
// @public @deprecated (undocumented)
export const switchClassName: string;
// @public (undocumented)
export const switchClassNames: SlotClassNames<SwitchSlots>;
// @public (undocumented)
export type SwitchOnChangeData = {
checked: boolean;
};
// @public
export type SwitchProps = Omit<ComponentProps<Partial<SwitchSlots>, 'input'>, 'checked' | 'defaultChecked' | 'onChange' | 'size'> & {
checked?: boolean;
disabledFocusable?: boolean;
defaultChecked?: boolean;
labelPosition?: 'above' | 'after' | 'before';
size?: 'small' | 'medium';
onChange?: (ev: React_2.ChangeEvent<HTMLInputElement>, data: SwitchOnChangeData) => void;
};
// @public (undocumented)
export type SwitchSlots = {
root: NonNullable<Slot<'div'>>;
indicator: NonNullable<Slot<'div'>>;
input: NonNullable<Slot<'input'>>;
label?: Slot<typeof Label>;
};
// @public
export type SwitchState = ComponentState<SwitchSlots> & Required<Pick<SwitchProps, 'disabledFocusable' | 'labelPosition' | 'size'>>;
// @public
export const useSwitch_unstable: (props: SwitchProps, ref: React_2.Ref<HTMLInputElement>) => SwitchState;
// @public
export const useSwitchStyles_unstable: (state: SwitchState) => SwitchState;
// (No @packageDocumentation comment for this package)