fix: bake standard tooltip styling into TooltipContent component

Added font-mono tabular-nums text-stat-value directly to the
TooltipContent base styles so every tooltip in the app inherits
the same look without per-instance wrappers. Removed the now-
redundant span from StackRow's RowTooltip.
This commit is contained in:
SaelixCode
2026-07-03 15:22:36 -04:00
parent f83f01417c
commit ef85f57cf2
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ function RowTooltip({ trigger, label }: { trigger: ReactNode; label: string }) {
<Tooltip>
<TooltipTrigger asChild>{trigger}</TooltipTrigger>
<TooltipContent side="bottom" sideOffset={4} align="center">
<span className="font-mono text-xs tabular-nums text-stat-value">{label}</span>
{label}
</TooltipContent>
</Tooltip>
</TooltipProvider>
@@ -43,7 +43,7 @@ describe('StackRow', () => {
});
it('wraps the partial pill in a hover tooltip', () => {
const { container } = render(<StackRow {...base({ status: 'partial', running: 3, total: 5 })} />);
render(<StackRow {...base({ status: 'partial', running: 3, total: 5 })} />);
const trigger = screen.getByText('PT');
// Radix TooltipTrigger adds data-state to the wrapped element.
expect(trigger.getAttribute('data-state')).toBe('closed');