mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 11:23:10 +02:00
Fix split tooltips (#5847)
Co-authored-by: EthanHealy01 <[email protected]>
This commit is contained in:
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>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user