2026-08-17 17:21:18 +02:00
|
|
|
import { ArrowUpRight } from "@phosphor-icons/react/ssr";
|
2026-08-17 13:49:55 +02:00
|
|
|
import type { Widget } from "@/lib/config/schema";
|
2026-08-17 17:21:18 +02:00
|
|
|
import { PN_CARD_CLASS } from "@/components/widgets/WidgetCard";
|
2026-08-17 13:49:55 +02:00
|
|
|
|
|
|
|
|
type BookmarkWidget = Extract<Widget, { type: "bookmark" }>;
|
|
|
|
|
|
|
|
|
|
export function BookmarkWidget({ widget }: { widget: BookmarkWidget }) {
|
|
|
|
|
return (
|
|
|
|
|
<a
|
|
|
|
|
href={widget.href}
|
|
|
|
|
target="_blank"
|
|
|
|
|
rel="noreferrer"
|
2026-08-17 17:21:18 +02:00
|
|
|
className={`${PN_CARD_CLASS} text-inherit no-underline`}
|
|
|
|
|
style={{ gridColumn: "span 3" }}
|
2026-08-17 13:49:55 +02:00
|
|
|
>
|
2026-08-17 17:21:18 +02:00
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<span className="flex-1 text-[15px] font-medium text-fg">{widget.name}</span>
|
|
|
|
|
<ArrowUpRight size={16} className="text-accent" aria-hidden />
|
|
|
|
|
</div>
|
|
|
|
|
{widget.description && <span className="text-xs text-fg-muted">{widget.description}</span>}
|
2026-08-17 13:49:55 +02:00
|
|
|
</a>
|
|
|
|
|
);
|
|
|
|
|
}
|