@spaced-out/ui-design-system
Version:
Sense UI components library
41 lines • 1.77 kB
TypeScript
import * as React from 'react';
import type { Flow } from 'flow-to-typescript-codemod';
import type { ClickAwayRefType } from '../../utils/click-away';
import type { ButtonProps } from '../../components/Button';
import type { MenuOption, MenuProps } from '../../components/Menu';
import type { BaseTooltipProps, ElevationType } from '../../components/Tooltip';
export declare const ANCHOR_POSITION_TYPE: Readonly<{
top: "top";
topStart: "top-start";
topEnd: "top-end";
bottom: "bottom";
bottomStart: "bottom-start";
bottomEnd: "bottom-end";
}>;
export declare const STRATEGY_TYPE: Readonly<{
absolute: "absolute";
fixed: "fixed";
}>;
export type AnchorType = (typeof ANCHOR_POSITION_TYPE)[keyof typeof ANCHOR_POSITION_TYPE];
export type Strategy = (typeof STRATEGY_TYPE)[keyof typeof STRATEGY_TYPE];
type ClassNames = Readonly<{
buttonWrapper?: string;
dropdownContainer?: string;
buttonIcon?: string;
}>;
export interface ButtonDropdownProps extends Omit<ButtonProps, 'classNames' | 'menu' | 'positionStrategy' | 'anchorPosition' | 'onOptionSelect' | 'onMenuOpen' | 'onMenuClose' | 'tooltip' | 'elevation' | 'clickAwayRef'> {
classNames?: ClassNames;
menu?: MenuProps;
positionStrategy?: Strategy;
anchorPosition?: AnchorType;
onOptionSelect?: (option: MenuOption, arg2?: React.SyntheticEvent<HTMLElement> | null | undefined) => unknown;
onMenuOpen?: () => unknown;
onMenuClose?: () => unknown;
tooltip?: BaseTooltipProps;
elevation?: ElevationType;
clickAwayRef?: React.RefObject<ClickAwayRefType | null>;
testId?: string;
}
export declare const ButtonDropdown: Flow.AbstractComponent<ButtonDropdownProps, HTMLDivElement>;
export {};
//# sourceMappingURL=ButtonDropdown.d.ts.map