mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-17 22:17:50 +00:00
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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user