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

20 lines
629 B
TypeScript
Raw Normal View History

2026-08-17 13:49:55 +02:00
import type { Widget } from "@/lib/config/schema";
type BookmarkWidget = Extract<Widget, { type: "bookmark" }>;
export function BookmarkWidget({ widget }: { widget: BookmarkWidget }) {
return (
<a
href={widget.href}
target="_blank"
rel="noreferrer"
className="flex flex-col gap-1 rounded-[var(--radius-widget)] border border-border bg-surface p-4 transition-colors hover:border-accent"
>
<span className="text-sm font-medium text-fg">{widget.name}</span>
{widget.description && (
<span className="text-xs text-fg-muted">{widget.description}</span>
)}
</a>
);
}