Files
alpenwerk-hr/components/ui/Card.tsx
Raphael Müllner b47dec6387 Übergabestand 2026-10-14
Alpenwerk HR — HR-Stammdatenverwaltung

Mitarbeiter:innen, Organisationsstruktur, Planstellen, Eintritt, Austritt,
Versetzung, Beförderung, Karenz, On- und Offboarding, Berichte, Exporte,
Massenimport und ein lückenloser Nachweis jeder Änderung.

Next.js 16, React 19 und TypeScript; PostgreSQL über Kysely; Anmeldung
ausschliesslich über Microsoft Entra ID. Die Fachlogik liegt in der
Datenbank, die Zugriffsschranke ist Row Level Security.

Betrieb auf Windows Server: siehe deploy/windows/README.md.
Sicherheitskonzept: docs/sicherheitskonzept.md.
2026-10-14 10:12:22 +02:00

32 lines
1.2 KiB
TypeScript

import type { ReactNode } from "react";
// One card style for the whole app. A 1px border and nothing else leaves a
// card with no separation from the page; with a single definition the whole
// app's depth is one line to change.
export const CARD_CLASS = "rounded-md border border-border bg-white shadow-[var(--shadow-card)]";
export function Card({
children,
className = "",
padding = "md",
}: {
children: ReactNode;
className?: string;
/** `none` for cards that manage their own inner spacing (tables, lists). */
padding?: "none" | "sm" | "md" | "lg";
}) {
const pad = { none: "", sm: "p-3", md: "p-4", lg: "p-6" }[padding];
return <div className={`${CARD_CLASS} ${pad} ${className}`}>{children}</div>;
}
/**
* Section titles in `text-sm font-bold text-ink` would match emphasised body
* text in weight and size, so headings would not read as a level of their
* own. Slightly smaller, letter-spaced and muted separates them without
* shouting.
*/
export function CardTitle({ children, className = "" }: { children: ReactNode; className?: string }) {
return <h2 className={`text-xs font-bold uppercase tracking-wider text-ink-muted ${className}`}>{children}</h2>;
}