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:
parent
58e5c179a0
commit
3a87f7fa4c
1 changed files with 5 additions and 1 deletions
|
|
@ -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();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue