refactor(market-card.tsx): wrap market card title with ShadTooltip component to add tooltip functionality for long names

feat(market-card.tsx): add support for handling installation of components when already added and installable
This commit is contained in:
anovazzi1 2023-11-13 15:30:57 -03:00
commit 3a87f7fa4c

View file

@ -137,7 +137,9 @@ export const MarketCardComponent = ({
<CardHeader> <CardHeader>
<div> <div>
<CardTitle className="flex w-full items-center justify-between gap-3 text-xl"> <CardTitle className="flex w-full items-center justify-between gap-3 text-xl">
<span className="w-full truncate">{data.name}</span> <ShadTooltip content={data.name}>
<div className="w-full truncate">{data.name}</div>
</ShadTooltip>
<div className="flex gap-3"> <div className="flex gap-3">
{!data.is_component && ( {!data.is_component && (
<ShadTooltip content="Components"> <ShadTooltip content="Components">
@ -238,6 +240,8 @@ export const MarketCardComponent = ({
} }
if (!added) { if (!added) {
handleAdd(); handleAdd();
} else if (installable) {
handleInstall();
} }
}} }}
> >