refactor(tags): use TextAttribute/ThemeTag, drop redundant fit-content

This commit is contained in:
jialin
2026-07-17 17:04:57 +08:00
committed by jialin
parent 2164a8198b
commit c6b89f688e
4 changed files with 25 additions and 41 deletions
@@ -28,21 +28,13 @@ interface ColumnsHookProps {
const getKindLabel = (record: ListItem) => {
if (record.spec?.nfs)
return (
<ThemeTag
style={{ width: 'fit-content' }}
color="cyan"
icon={<FolderOutlined />}
>
<ThemeTag color="cyan" icon={<FolderOutlined />}>
{StorageTypeKindLabelMap.nfs}
</ThemeTag>
);
if (record.spec?.s3)
return (
<ThemeTag
style={{ width: 'fit-content' }}
color="green"
icon={<IconFont type="icon-database" />}
>
<ThemeTag color="green" icon={<IconFont type="icon-database" />}>
{StorageTypeKindLabelMap.s3}
</ThemeTag>
);