fix(variable-inspect): anchor clear button to right side of tab header

Position the clear button relative to the right divider instead of
following the tab labels, ensuring consistent positioning across
different language translations. Also fix tab switching jitter by
setting a fixed header height.
This commit is contained in:
yyh 2026-01-28 20:34:23 +08:00
parent acec271e88
commit f9f3d33911
No known key found for this signature in database

View File

@ -22,7 +22,7 @@ const TabHeader: FC<TabHeaderProps> = ({
const { t } = useTranslation('workflow')
return (
<div className="flex shrink-0 items-center gap-0.5 pl-3 pr-2 pt-2">
<div className="flex h-10 w-full shrink-0 items-center gap-0.5 pl-3 pr-2">
{TAB_ITEMS.map(tab => (
<button
key={tab.value}
@ -38,7 +38,7 @@ const TabHeader: FC<TabHeaderProps> = ({
{t(tab.labelKey)}
</button>
))}
{children}
<div className="ml-auto">{children}</div>
</div>
)
}