Fix split tooltips (#5847)

Co-authored-by: EthanHealy01 <[email protected]>
This commit is contained in:
Reece Browne
2026-03-03 13:49:05 +00:00
committed by GitHub
co-authored by EthanHealy01
parent 3e4c984fcc
commit 93d7919c4c
@@ -35,16 +35,23 @@ const CardSelector = <T, K extends CardOption<T>>({
if (getTooltipContent) { if (getTooltipContent) {
return getTooltipContent(option); return getTooltipContent(option);
} }
if (option.tooltipKey) {
const text = t(option.tooltipKey, '');
if (text) return [{ description: text }];
}
return []; return [];
}; };
return ( return (
<Stack gap="sm"> <Stack gap="sm">
{options.map((option) => ( {options.map((option) => {
const tips = getTooltips(option);
return (
<Tooltip <Tooltip
key={option.value as string} key={option.value as string}
sidebarTooltip sidebarTooltip
tips={getTooltips(option)} tips={tips}
disabled={tips.length === 0}
> >
<Card <Card
radius="md" radius="md"
@@ -91,7 +98,8 @@ const CardSelector = <T, K extends CardOption<T>>({
</Flex> </Flex>
</Card> </Card>
</Tooltip> </Tooltip>
))} );
})}
</Stack> </Stack>
); );
}; };