mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 18:50:41 +01:00
chore(website): use same more info mechanism for list with screenshot
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { ComponentChildren, HTMLAttributes } from "preact";
|
import { ComponentChildren, HTMLAttributes } from "preact";
|
||||||
import Button from "./Button";
|
import Button, { Link } from "./Button";
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
|
|
||||||
interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
||||||
@@ -28,7 +28,7 @@ export default function Card({ title, children, imageUrl, iconSvg, className, mo
|
|||||||
|
|
||||||
{moreInfoUrl && (
|
{moreInfoUrl && (
|
||||||
<div className="more-info-container">
|
<div className="more-info-container">
|
||||||
<Button href={moreInfoUrl} className="more-info" text="More info" outline openExternally />
|
<Link href={moreInfoUrl} className="more-info" openExternally>More info</Link>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -211,12 +211,9 @@ function ListWithScreenshot({ items, horizontal, cardExtra }: {
|
|||||||
title={item.title}
|
title={item.title}
|
||||||
onMouseEnter={() => setSelectedItem(item)}
|
onMouseEnter={() => setSelectedItem(item)}
|
||||||
onClick={() => setSelectedItem(item)}
|
onClick={() => setSelectedItem(item)}
|
||||||
|
moreInfoUrl={item.moreInfo}
|
||||||
>
|
>
|
||||||
{item.description}
|
{item.description}
|
||||||
|
|
||||||
<div class="card-footer">
|
|
||||||
<Link href={selectedItem.moreInfo}>More info</Link>
|
|
||||||
</div>
|
|
||||||
</Card>
|
</Card>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user