收口首页与详情动作按钮

为 CopyFeedbackButton 增加 actionShape 共享能力
将拼图广场详情 hero 动作迁移到共享按钮组件
将智能创作首页与抽屉入口迁移到共享按钮组件
将绑定手机号身份提示块迁移到 PlatformSubpanel
同步更新 PlatformUiKit 收口文档与团队决策记录
This commit is contained in:
2026-06-10 15:57:58 +08:00
parent 7411b9a435
commit eb73ffb34d
10 changed files with 163 additions and 53 deletions

View File

@@ -103,6 +103,7 @@ test('can opt into platform action button chrome', () => {
state="idle"
idleLabel="复制报错"
actionSurface="platform"
actionShape="pill"
actionFullWidth
/>,
);
@@ -111,6 +112,7 @@ test('can opt into platform action button chrome', () => {
expect(button.className).toContain('platform-button--primary');
expect(button.className).toContain('w-full');
expect(button.className).toContain('rounded-full');
expect(button.className).toContain('disabled:cursor-not-allowed');
});

View File

@@ -4,6 +4,7 @@ import type { ButtonHTMLAttributes, ReactNode } from 'react';
import {
getPlatformActionButtonClassName,
type PlatformActionButtonSize,
type PlatformActionButtonShape,
type PlatformActionButtonSurface,
type PlatformActionButtonTone,
} from './platformActionButtonModel';
@@ -34,6 +35,7 @@ type CopyFeedbackButtonProps = Omit<
actionSurface?: PlatformActionButtonSurface;
actionTone?: PlatformActionButtonTone;
actionSize?: PlatformActionButtonSize;
actionShape?: PlatformActionButtonShape;
actionFullWidth?: boolean;
actionAppearance?: CopyFeedbackButtonActionAppearance;
actionPillTone?: PlatformPillBadgeTone;
@@ -74,6 +76,7 @@ export function CopyFeedbackButton({
actionSurface,
actionTone = 'primary',
actionSize = 'sm',
actionShape = 'default',
actionFullWidth = false,
actionAppearance = 'plain',
actionPillTone = 'neutral',
@@ -112,6 +115,7 @@ export function CopyFeedbackButton({
surface: actionSurface,
tone: actionTone,
size: actionSize,
shape: actionShape,
fullWidth: actionFullWidth,
})
: actionAppearance === 'pill'