UNPKG

685 BTypeScriptView Raw
1import React from 'react';
2import type { ReactNode } from 'react';
3import { PopoverProps, PopoverRef } from './popover';
4export declare type Action = {
5 text: ReactNode;
6 icon?: ReactNode;
7 disabled?: boolean;
8 key?: string | number;
9 onClick?: () => void;
10};
11export declare type PopoverMenuProps = Omit<PopoverProps, 'content'> & {
12 actions: Action[];
13 maxCount?: number;
14 onAction?: (item: Action) => void;
15};
16export declare const PopoverMenu: React.ForwardRefExoticComponent<Omit<PopoverProps, "content"> & {
17 actions: Action[];
18 maxCount?: number | undefined;
19 onAction?: ((item: Action) => void) | undefined;
20} & React.RefAttributes<PopoverRef>>;
21
\No newline at end of file