Files
pulsenode/components/layout/GroupSection.tsx
T

19 lines
652 B
TypeScript
Raw Normal View History

2026-08-17 13:49:55 +02:00
import type { Group } from "@/lib/config/schema";
import { widgetRegistry } from "@/components/widgets/registry";
export function GroupSection({ group }: { group: Group }) {
return (
<section className="flex flex-col gap-3">
<h2 className="text-xs font-semibold tracking-wide text-fg-muted uppercase">
{group.name}
</h2>
<div className="grid grid-cols-[repeat(auto-fill,minmax(220px,1fr))] gap-3">
{group.widgets.map((widget, index) => {
const Component = widgetRegistry[widget.type];
return <Component key={index} widget={widget as never} />;
})}
</div>
</section>
);
}