新增 PlatformAcknowledgeStatusDialog 统一承接单按钮已读状态壳层 迁移大鱼结果页与个人中心支付结果复用共享已读状态弹窗 迁移 RPG 编辑器与平台入口提示链路复用共享已读状态弹窗 迁移自定义世界实体目录阻断提示复用共享已读状态弹窗 补充共享组件测试并更新 PlatformUiKit 收口文档与决策记录
112 lines
2.7 KiB
TypeScript
112 lines
2.7 KiB
TypeScript
import type { ReactNode } from 'react';
|
|
|
|
import type {
|
|
PlatformActionButtonSize,
|
|
PlatformActionButtonSurface,
|
|
PlatformActionButtonTone,
|
|
} from './platformActionButtonModel';
|
|
import {
|
|
PlatformStatusDialog,
|
|
type PlatformStatusDialogStatus,
|
|
} from './PlatformStatusDialog';
|
|
|
|
type PlatformAcknowledgeStatusDialogProps = {
|
|
open?: boolean;
|
|
status: PlatformStatusDialogStatus;
|
|
title: string;
|
|
description?: ReactNode;
|
|
children?: ReactNode;
|
|
onClose: () => void;
|
|
actionLabel?: string;
|
|
actionDisabled?: boolean;
|
|
actionTone?: PlatformActionButtonTone;
|
|
actionSurface?: PlatformActionButtonSurface;
|
|
actionSize?: PlatformActionButtonSize;
|
|
actionFullWidth?: boolean;
|
|
actionClassName?: string;
|
|
showHeader?: boolean;
|
|
showBodyTitle?: boolean;
|
|
showCloseButton?: boolean;
|
|
closeOnBackdrop?: boolean;
|
|
closeOnEscape?: boolean;
|
|
closeLabel?: string;
|
|
closeDisabled?: boolean;
|
|
zIndexClassName?: string;
|
|
overlayClassName?: string;
|
|
panelClassName?: string;
|
|
bodyClassName?: string;
|
|
iconClassName?: string;
|
|
icon?: ReactNode;
|
|
iconLabel?: string;
|
|
};
|
|
|
|
/**
|
|
* 平台已读确认状态弹窗。
|
|
* 统一承接“状态提示 + 知道了”这一类单按钮确认已读的弹窗语义。
|
|
*/
|
|
export function PlatformAcknowledgeStatusDialog({
|
|
open,
|
|
status,
|
|
title,
|
|
description,
|
|
children,
|
|
onClose,
|
|
actionLabel = '知道了',
|
|
actionDisabled = false,
|
|
actionTone,
|
|
actionSurface = 'platform',
|
|
actionSize,
|
|
actionFullWidth,
|
|
actionClassName,
|
|
showHeader,
|
|
showBodyTitle,
|
|
showCloseButton,
|
|
closeOnBackdrop,
|
|
closeOnEscape,
|
|
closeLabel,
|
|
closeDisabled,
|
|
zIndexClassName,
|
|
overlayClassName,
|
|
panelClassName,
|
|
bodyClassName,
|
|
iconClassName,
|
|
icon,
|
|
iconLabel,
|
|
}: PlatformAcknowledgeStatusDialogProps) {
|
|
return (
|
|
<PlatformStatusDialog
|
|
open={open}
|
|
status={status}
|
|
title={title}
|
|
description={description}
|
|
onClose={onClose}
|
|
showHeader={showHeader}
|
|
showBodyTitle={showBodyTitle}
|
|
showCloseButton={showCloseButton}
|
|
closeOnBackdrop={closeOnBackdrop}
|
|
closeOnEscape={closeOnEscape}
|
|
closeLabel={closeLabel}
|
|
closeDisabled={closeDisabled}
|
|
zIndexClassName={zIndexClassName}
|
|
overlayClassName={overlayClassName}
|
|
panelClassName={panelClassName}
|
|
bodyClassName={bodyClassName}
|
|
iconClassName={iconClassName}
|
|
icon={icon}
|
|
iconLabel={iconLabel}
|
|
action={{
|
|
label: actionLabel,
|
|
onClick: onClose,
|
|
disabled: actionDisabled,
|
|
tone: actionTone,
|
|
surface: actionSurface,
|
|
size: actionSize,
|
|
fullWidth: actionFullWidth,
|
|
className: actionClassName,
|
|
}}
|
|
>
|
|
{children}
|
|
</PlatformStatusDialog>
|
|
);
|
|
}
|