carbon-react
Version:
A library of reusable React components for easily building user interfaces.
22 lines (21 loc) • 905 B
TypeScript
import React from "react";
declare const useChildButtons: (toggleButtonRef: React.RefObject<HTMLButtonElement>, widthRatio?: number) => {
showAdditionalButtons: boolean;
showButtons: () => void;
hideButtons: () => void;
buttonNode: React.RefObject<HTMLDivElement>;
handleToggleButtonKeyDown: (ev: React.KeyboardEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
wrapperProps: {
"data-element": string;
role: string;
onKeyDown: (ev: React.KeyboardEvent<HTMLElement>) => void;
onBlur: (ev: React.FocusEvent<HTMLElement>) => void;
minWidth: number;
ref: React.RefObject<HTMLUListElement>;
};
contextValue: {
inSplitButton: boolean;
onChildButtonClick: (childOnClick?: React.MouseEventHandler<HTMLButtonElement>) => (ev: React.MouseEvent<HTMLButtonElement>) => void;
};
};
export default useChildButtons;