UNPKG

@adyen/adyen-platform-experience-web

Version:

![Platform Experience header](https://github.com/Adyen/adyen-platform-experience-web/assets/7926613/18094965-9e01-450e-8dc9-ea84e6b22c2b)

18 lines 909 B
export type TabbedControlOptions<OptionId extends string> = readonly { id: OptionId; disabled?: boolean; }[]; export interface TabbedControlConfig<OptionId extends string, Options extends TabbedControlOptions<OptionId>> { onChange?: <ActiveOption extends Options[number]>(activeOption: ActiveOption) => void; activeOption?: OptionId; options: Options; } export declare const useTabbedControl: <OptionId extends string, Options extends TabbedControlOptions<OptionId>>({ options, activeOption: activeOptionFromProps, onChange, }: TabbedControlConfig<OptionId, Options>) => { readonly activeIndex: number; readonly onClick: (event: MouseEvent) => void; readonly onKeyDown: (event: KeyboardEvent) => void; readonly refs: ((el: HTMLButtonElement | null) => any)[]; readonly uniqueId: string; }; export default useTabbedControl; //# sourceMappingURL=useTabbedControl.d.ts.map