///
import * as Icons from '@alipay/sofa-icons';
import type { PopoverMenuProps } from 'antd-mobile';
export type Action = {
/**
* 图标
* @type { keyof typeof Icons | React.ReactElement }
* @default undefined
*/
icon?: keyof typeof Icons | React.ReactElement;
/**
* 文本
* @type { string }
* @default ''
*/
text: string;
/**
* 是否禁用
* @type { boolean }
* @default false
*/
disabled?: boolean;
/**
* 点击回调
* @type { () => void }
* @default undefined
* @returns { void }
*/
onClick?: () => void;
};
export interface ActionsProps extends Omit {
/**
* 操作按钮组
* @type { Action[] }
* @default []
*/
actions: Action[];
/**
* 额外内容
* @type { React.ReactNode }
* @default undefined
*/
extra?: React.ReactNode;
/**
* 最大显示数量
* @type { number }
* @default undefined
*/
maxCount?: number;
/**
* 自定义类名
* @type { string }
* @default undefined
*/
className?: string;
/**
* 自定义样式
* @type { React.CSSProperties }
* @default undefined
*/
style?: React.CSSProperties;
/**
* 子元素,用于触发弹出操作
* @type { React.ReactElement }
* @default undefined
*/
children?: React.ReactElement;
/**
* 自定义渲染操作项
* @type { (item: Action) => React.ReactNode }
* @default undefined
*/
itemRender?: (item: Action) => React.ReactNode;
/**
* 布局方向
* @type { 'ltr' | 'rtl' }
* @default 'ltr'
*/
direction?: 'ltr' | 'rtl';
}