@mskcc/carbon-react
Version:
Carbon react components for the MSKCC DSM
44 lines (43 loc) • 1.64 kB
TypeScript
/**
* Copyright IBM Corp. 2020, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, { type ComponentType, type FunctionComponent } from 'react';
interface OverflowMenuProps {
/**
* **Experimental**: Will attempt to automatically align the floating element to avoid collisions with the viewport and being clipped by ancestor elements.
*/
autoAlign?: boolean;
/**
* A collection of MenuItems to be rendered within this OverflowMenu.
*/
children?: React.ReactNode;
/**
* Additional CSS class names for the trigger button.
*/
className?: string;
/**
* A label describing the options available. Is used in the trigger tooltip and as the menu's accessible label.
*/
label?: string;
/**
* Experimental property. Specify how the menu should align with the button element
*/
menuAlignment?: 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
/**
* Optionally provide a custom icon to be rendered on the trigger button.
*/
renderIcon?: ComponentType | FunctionComponent;
/**
* Specify the size of the menu, from a list of available sizes.
*/
size?: 'sm' | 'md' | 'lg';
/**
* Specify how the trigger tooltip should be aligned.
*/
tooltipAlignment?: 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right';
}
declare const OverflowMenu: React.ForwardRefExoticComponent<OverflowMenuProps & React.RefAttributes<HTMLDivElement>>;
export { OverflowMenu };