Files
pulsenode/components/widgets/bookmark/Widget.tsx
T

24 lines
838 B
TypeScript
Raw Normal View History

import { ArrowUpRight } from "@phosphor-icons/react/ssr";
2026-08-17 13:49:55 +02:00
import type { Widget } from "@/lib/config/schema";
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"
className={`${PN_CARD_CLASS} text-inherit no-underline`}
style={{ gridColumn: "span 3" }}
2026-08-17 13:49:55 +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>
);
}