mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2026-03-04 02:20:19 +01:00
Fix split tooltips (#5847)
Co-authored-by: EthanHealy01 <80844253+EthanHealy01@users.noreply.github.com>
This commit is contained in:
@@ -35,16 +35,23 @@ const CardSelector = <T, K extends CardOption<T>>({
|
||||
if (getTooltipContent) {
|
||||
return getTooltipContent(option);
|
||||
}
|
||||
if (option.tooltipKey) {
|
||||
const text = t(option.tooltipKey, '');
|
||||
if (text) return [{ description: text }];
|
||||
}
|
||||
return [];
|
||||
};
|
||||
|
||||
return (
|
||||
<Stack gap="sm">
|
||||
{options.map((option) => (
|
||||
{options.map((option) => {
|
||||
const tips = getTooltips(option);
|
||||
return (
|
||||
<Tooltip
|
||||
key={option.value as string}
|
||||
sidebarTooltip
|
||||
tips={getTooltips(option)}
|
||||
tips={tips}
|
||||
disabled={tips.length === 0}
|
||||
>
|
||||
<Card
|
||||
radius="md"
|
||||
@@ -91,7 +98,8 @@ const CardSelector = <T, K extends CardOption<T>>({
|
||||
</Flex>
|
||||
</Card>
|
||||
</Tooltip>
|
||||
))}
|
||||
);
|
||||
})}
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user