收口统一弹窗关闭按钮
新增 PlatformModalCloseButton pixel 变体承接像素风关闭入口 将 UnifiedModal 头部关闭按钮迁移到 PlatformModalCloseButton 补充平台态和像素态关闭按钮测试 更新 PlatformUiKit 文档和 Hermes 决策记录
This commit is contained in:
@@ -71,9 +71,20 @@ test('supports platform icon close button', () => {
|
||||
const button = screen.getByRole('button', { name: '关闭素材图片' });
|
||||
|
||||
expect(button.className).toContain('platform-icon-button');
|
||||
expect(button.className).toContain('disabled:opacity-45');
|
||||
expect(button.querySelector('svg')).toBeTruthy();
|
||||
});
|
||||
|
||||
test('supports pixel close button', () => {
|
||||
render(<PlatformModalCloseButton label="关闭像素弹窗" variant="pixel" />);
|
||||
|
||||
const button = screen.getByRole('button', { name: '关闭像素弹窗' });
|
||||
|
||||
expect(button.className).toContain('bg-black/20');
|
||||
expect(button.className).toContain('text-zinc-400');
|
||||
expect(button.className).toContain('disabled:opacity-45');
|
||||
});
|
||||
|
||||
test('supports editor dark close button', () => {
|
||||
render(
|
||||
<PlatformModalCloseButton label="关闭角色自定义" variant="editorDark" />,
|
||||
|
||||
Reference in New Issue
Block a user