收口作品详情点赞按钮
为 PlatformActionButton 增加 accentSoft tone 将作品详情点赞按钮迁移到 PlatformActionButton 删除作品详情点赞按钮本地 chrome CSS 补充公共按钮和作品详情点赞断言 更新 PlatformUiKit 文档和 Hermes 决策记录
This commit is contained in:
@@ -153,7 +153,11 @@ test('PlatformWorkDetailView renders compact stats and date time', () => {
|
||||
expect(screen.getByRole('button', { name: '分享' }).className).toContain(
|
||||
'platform-icon-button',
|
||||
);
|
||||
expect(screen.getByRole('button', { name: '点赞 4赞' })).toBeTruthy();
|
||||
const likeButton = screen.getByRole('button', { name: '点赞 4赞' });
|
||||
expect(likeButton).toBeTruthy();
|
||||
expect(likeButton.className).toContain('platform-action-button--accent-soft');
|
||||
expect(likeButton.className).toContain('platform-work-detail__like');
|
||||
expect(likeButton.className).toContain('flex-col');
|
||||
const remixAction = screen.getByRole('button', { name: '作品改造' });
|
||||
const startAction = screen.getByRole('button', { name: '启动' });
|
||||
expect(remixAction.className).toContain('platform-button');
|
||||
|
||||
@@ -378,17 +378,18 @@ export function PlatformWorkDetailView({
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
<PlatformActionButton
|
||||
type="button"
|
||||
className="platform-work-detail__like"
|
||||
tone="accentSoft"
|
||||
onClick={onLike}
|
||||
disabled={isBusy}
|
||||
aria-label={`点赞 ${formatCompactCount(stats.likeCount)}赞`}
|
||||
title="点赞"
|
||||
className="platform-work-detail__like min-w-[5.2rem] flex-col gap-1 px-3 py-2.5 text-[0.8125rem] [--platform-action-accent:var(--platform-work-like-accent,#c7653d)]"
|
||||
>
|
||||
<Heart className="h-5 w-5 fill-current" />
|
||||
点赞
|
||||
</button>
|
||||
</PlatformActionButton>
|
||||
</div>
|
||||
|
||||
<div className="platform-work-detail__stats">
|
||||
|
||||
Reference in New Issue
Block a user