@navikt/ds-react
Version:
React components from the Norwegian Labour and Welfare Administration.
20 lines (19 loc) • 709 B
TypeScript
export interface UseTabProps {
/**
* If `true`, the `Tab` won't be toggleable
* @default false
*/
disabled?: boolean;
onClick?: React.MouseEventHandler;
onFocus?: React.FocusEventHandler;
value: string;
}
export declare function useTab<P extends UseTabProps>({ value, disabled, onFocus: _onFocus, onClick }: P, ref: React.ForwardedRef<HTMLButtonElement>): {
ref: (instance: HTMLButtonElement | null) => void;
isSelected: boolean;
isFocused: boolean;
id: string;
controlsId: string;
onClick: (event: import("react").MouseEvent<Element, MouseEvent>) => void;
onFocus: ((event: import("react").FocusEvent<Element, Element>) => void) | undefined;
};