Files
faunosteo/apps/app/src/components/ui/Card.tsx
T
bchanot 930499cd25 feat(app): animal screens, relation panels, animals on the client page
Routes /app/animals, new, :animalId, edit under one workspace gate; list with
species filter; form (D-R7, U3 birth, no default sex or role, optional first
client); page with current and former relations, end, dates, void; client page
links its animals, adds one pre-associated, links an existing one. Card now
passes aria-labelledby, which it silently dropped.
2026-10-26 17:11:28 +01:00

29 lines
634 B
TypeScript

import type { ReactNode } from 'react'
export interface CardProps {
children: ReactNode
className?: string
as?: 'div' | 'section' | 'article'
/** Names a section card by its heading, so it reads as a named region. */
'aria-labelledby'?: string
}
export default function Card({
children,
className = '',
as: Tag = 'div',
'aria-labelledby': labelledBy,
}: CardProps) {
return (
<Tag
aria-labelledby={labelledBy}
className={[
'rounded-2xl border border-[var(--color-border)] bg-[var(--color-surface)] shadow-sm',
className,
].join(' ')}
>
{children}
</Tag>
)
}