fix(web): fix tool item text not vertically centered in block selector (#33148)

This commit is contained in:
yyh
2026-03-09 13:38:11 +08:00
committed by GitHub
parent 0590b09958
commit f2d3feca66
3 changed files with 4 additions and 10 deletions

View File

@@ -111,11 +111,11 @@ const ToolItem: FC<Props> = ({
}) })
}} }}
> >
<div className={cn('system-sm-medium h-8 truncate border-l-2 border-divider-subtle pl-4 leading-8 text-text-secondary')}> <div className={cn('truncate border-l-2 border-divider-subtle py-2 pl-4 text-text-secondary system-sm-medium')}>
<span className={cn(disabled && 'opacity-30')}>{payload.label[language]}</span> <span className={cn(disabled && 'opacity-30')}>{payload.label[language]}</span>
</div> </div>
{isAdded && ( {isAdded && (
<div className="system-xs-regular mr-4 text-text-tertiary">{t('addToolModal.added', { ns: 'tools' })}</div> <div className="mr-4 text-text-tertiary system-xs-regular">{t('addToolModal.added', { ns: 'tools' })}</div>
)} )}
</div> </div>
</Tooltip> </Tooltip>

View File

@@ -77,11 +77,11 @@ const TriggerPluginActionItem: FC<Props> = ({
}) })
}} }}
> >
<div className={cn('system-sm-medium h-8 truncate border-l-2 border-divider-subtle pl-4 leading-8 text-text-secondary')}> <div className={cn('truncate border-l-2 border-divider-subtle py-2 pl-4 text-text-secondary system-sm-medium')}>
<span className={cn(disabled && 'opacity-30')}>{payload.label[language]}</span> <span className={cn(disabled && 'opacity-30')}>{payload.label[language]}</span>
</div> </div>
{isAdded && ( {isAdded && (
<div className="system-xs-regular mr-4 text-text-tertiary">{t('addToolModal.added', { ns: 'tools' })}</div> <div className="mr-4 text-text-tertiary system-xs-regular">{t('addToolModal.added', { ns: 'tools' })}</div>
)} )}
</div> </div>
</Tooltip> </Tooltip>

View File

@@ -6554,9 +6554,6 @@
"app/components/workflow/block-selector/tool/action-item.tsx": { "app/components/workflow/block-selector/tool/action-item.tsx": {
"no-restricted-imports": { "no-restricted-imports": {
"count": 1 "count": 1
},
"tailwindcss/enforce-consistent-class-order": {
"count": 2
} }
}, },
"app/components/workflow/block-selector/tool/tool-list-flat-view/list.tsx": { "app/components/workflow/block-selector/tool/tool-list-flat-view/list.tsx": {
@@ -6576,9 +6573,6 @@
"no-restricted-imports": { "no-restricted-imports": {
"count": 1 "count": 1
}, },
"tailwindcss/enforce-consistent-class-order": {
"count": 2
},
"ts/no-explicit-any": { "ts/no-explicit-any": {
"count": 1 "count": 1
} }