继续收口暗色局部动作按钮

预设形象编辑器按钮改为委托 PlatformActionButton
技能预览重播按钮改为委托 PlatformActionButton
更新 PlatformUiKit 收口文档与团队决策记录
This commit is contained in:
2026-06-11 02:10:35 +08:00
parent 01c0028b87
commit 02f4982cfe
4 changed files with 23 additions and 12 deletions

View File

@@ -28,6 +28,7 @@ import {
type CustomWorldNpcVisual,
type CustomWorldProfile,
} from '../types';
import { PlatformActionButton } from './common/PlatformActionButton';
import { buildDefaultCustomWorldNpcVisual } from './customWorldNpcVisualDefaults';
import { HostileNpcAnimator } from './HostileNpcAnimator';
import { MedievalNpcAnimator } from './MedievalNpcAnimator';
@@ -282,9 +283,18 @@ function ActionButton({
onClick: () => void;
tone?: 'default' | 'sky';
}) {
const buttonTone = tone === 'sky' ? 'primary' : 'ghost';
const visualClassName =
tone === 'sky'
? 'border-sky-300/22 bg-sky-500/12 text-sky-50 hover:border-sky-200/40 hover:bg-sky-500/12 hover:text-white'
: 'border-white/12 bg-black/20 text-zinc-200 hover:border-white/22 hover:bg-black/20 hover:text-white';
return (
<button
type="button"
<PlatformActionButton
surface="editorDark"
tone={buttonTone}
size="xs"
shape="pill"
onPointerDown={(event) => {
event.stopPropagation();
}}
@@ -292,14 +302,10 @@ function ActionButton({
event.stopPropagation();
}}
onClick={onClick}
className={`rounded-full border px-4 py-2 text-sm font-semibold transition-colors ${
tone === 'sky'
? 'border-sky-300/22 bg-sky-500/12 text-sky-50 hover:border-sky-200/40 hover:text-white'
: 'border-white/12 bg-black/20 text-zinc-200 hover:border-white/22 hover:text-white'
}`}
className={`text-sm font-semibold ${visualClassName}`}
>
{label}
</button>
</PlatformActionButton>
);
}