The frontend was built against HeroUI v2 props/classes (variant="light"/"flat", color="primary", startContent, text-tiny, <Avatar src=/name=>) while @heroui/react ^3.2.1 is installed, so most styling was silently ignored. Rewrites every page/component onto the actual v3 API (variant/color enums, Tooltip/Dropdown trigger-content structure, Avatar.Image/Fallback via a new AppAvatar helper) and replaces the custom orange branding with HeroUI's neutral default theme tokens. Also compacts the dashboard stat tiles, narrows the sidebar, and swaps the activity stat grid for a single-hue comparison bar chart. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
25 lines
759 B
TypeScript
25 lines
759 B
TypeScript
import { Card, CardHeader, CardContent, CardTitle, CardDescription } from '@heroui/react';
|
|
import type { ReactNode } from 'react';
|
|
|
|
type Props = {
|
|
title: string;
|
|
subtitle?: string;
|
|
children: ReactNode;
|
|
action?: ReactNode;
|
|
};
|
|
|
|
export function SectionCard({ title, subtitle, children, action }: Props) {
|
|
return (
|
|
<Card className="bg-surface-secondary">
|
|
<CardHeader className="flex items-start justify-between gap-4">
|
|
<div className="min-w-0 flex flex-col gap-1">
|
|
<CardTitle>{title}</CardTitle>
|
|
{subtitle && <CardDescription>{subtitle}</CardDescription>}
|
|
</div>
|
|
{action && <div className="shrink-0">{action}</div>}
|
|
</CardHeader>
|
|
<CardContent>{children}</CardContent>
|
|
</Card>
|
|
);
|
|
}
|