@mskcc/carbon-react
Version:
Carbon react components for the MSKCC DSM
56 lines (55 loc) • 1.49 kB
TypeScript
/**
* MSKCC DSM 2021, 2024
*/
import React from 'react';
import { ForwardRefReturn } from '../../types/common';
export interface OverflowMenuItemProps extends React.HTMLAttributes<HTMLElement> {
/**
* The CSS class name to be placed on the button element
*/
className?: string;
/**
* A callback to tell the parent menu component that the menu should be closed.
*/
closeMenu?: () => void;
/**
* `true` to make this menu item disabled.
*/
disabled?: boolean;
handleOverflowMenuItemFocus?: (options: {
currentIndex?: number;
direction: number;
}) => void;
/**
* `true` to make this menu item a divider.
*/
hasDivider?: boolean;
/**
* If given, overflow item will render as a link with the given href
*/
href?: string;
index?: number;
/**
* The text to show for the menu item
*/
itemText?: React.ReactNode;
/**
* `true` to make this menu item a danger button.
*/
isDelete?: boolean;
/**
* `true` to require the title attribute.
*/
requireTitle?: boolean;
/**
* The title attribute.
*/
title?: string;
/**
* The CSS class name to be placed on the wrapper element
*/
wrapperClassName?: string;
}
export type OverflowMenuItemComponent = ForwardRefReturn<HTMLElement, OverflowMenuItemProps>;
declare const OverflowMenuItem: OverflowMenuItemComponent;
export default OverflowMenuItem;