import { PopoverProps as PopoverPropsAntd } from 'antd/lib/popover'; import React, { CSSProperties } from 'react'; import { ColorScheme } from '@/theme'; import { Attribute } from '../Attributes'; import { PopoverProps } from '../Popover'; export interface ActionItem { dataTestId?: string; icon: string; label: string; disabled?: boolean | string; onClick: () => void; } export interface CalendarEventPopoverProps { 'data-test-id'?: string; /** * 标题 */ title: string; /** * 副标题 */ subtitle?: string | null; /** * 标签名称 */ tag?: string; /** * 标签样式 */ colorScheme: Pick; /** * 内容区显示的多行字段属性 */ attributes?: Attribute[]; /** * 内容区和底部操作栏之间的部分 */ afterAttributes?: React.ReactNode; /** * 底部操作行为 */ actions?: ActionItem[]; /** * 触发动作,默认 click */ trigger?: PopoverProps['trigger']; /** * 弹出位置 */ placement?: PopoverProps['placement']; /** * 内容区样式 */ contentStyle?: CSSProperties; /** * visible 受控模式 */ visible?: PopoverPropsAntd['visible']; /** * visible 变化时的 callback */ onVisibleChange?: PopoverPropsAntd['onVisibleChange']; /** * 标题点击事件 */ onClickTitle?: () => void; /** * 内容区点击事件 */ onClickContent?: () => void; }