carbon-react
Version:
A library of reusable React components for easily building user interfaces.
31 lines (30 loc) • 1.29 kB
TypeScript
import React from "react";
import { Alignment } from "../__internal__/action-popover.context";
import { IconType } from "../../icon";
export interface ActionPopoverItemProps {
/** The text label to display for this Item */
children: string;
/** Flag to indicate if item is disabled */
disabled?: boolean;
/** allows to provide download prop that works dependent with href */
download?: boolean;
/** allows to provide href prop */
href?: string;
/** The name of the icon to display next to the label */
icon?: IconType;
/** Callback to run when item is clicked */
onClick?: (ev: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
/** Submenu component for item */
submenu?: React.ReactNode;
/** @ignore @private */
focusItem?: boolean;
/** @ignore @private */
currentSubmenuPosition?: Alignment;
/** @ignore @private */
setCurrentSubmenuPosition?: (value: Alignment) => void;
}
export declare const ActionPopoverItem: {
({ children, icon, disabled, onClick: onClickProp, submenu, focusItem, download, href, currentSubmenuPosition, setCurrentSubmenuPosition, ...rest }: ActionPopoverItemProps): React.JSX.Element;
displayName: string;
};
export default ActionPopoverItem;