@ui-machines/tabs
Version:
Core logic for the tabs widget implemented as a state machine
17 lines (16 loc) • 710 B
TypeScript
import { StateMachine as S } from "@ui-machines/core";
import { PropTypes, ReactPropTypes } from "@ui-machines/types";
import { MachineContext, MachineState } from "./tabs.types";
export declare function connect<T extends PropTypes = ReactPropTypes>(state: S.State<MachineContext, MachineState>, send: (event: S.Event<S.AnyEventObject>) => void, normalize?: import("@ui-machines/types").NormalizeProps): {
value: string;
focusedValue: string;
setValue(value: string): void;
tablistProps: T["element"];
getTabProps({ value }: {
value: string;
}): T["button"];
getTabPanelProps({ value }: {
value: string;
}): T["element"];
tabIndicatorProps: T["element"];
};