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.
29 lines
634 B
TypeScript
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>
|
|
)
|
|
}
|