feat(client): add Card header/footer, DescriptionList, and portal ContextMenu

- add Card header prop (primary/secondary variants) and footer prop (sticks to bottom)
- add Breadcrumbs to all 5 pages; remove duplicate h1 headings
- add pageToolbar layout for breadcrumbs + danger button aligned right
- add DescriptionList component replacing raw dl/dt/dd markup; supports truncate+tooltip
- rewrite ContextMenu to render dropdown via React portal to avoid clip/overflow issues
- update EnvironmentCard to use Card header (primary), footer (Timestamp), and truncated DescriptionList
- fix cog button contrast, square sizing, and right-edge alignment on colored header
- add border to Timestamp pill for dark-mode visibility
- add id badge pill styling to environment card header
This commit is contained in:
ars9 committed 2026-04-09 14:29:16 +03:00
1 parent 35997f8bcb
commit 89016b01d2
13 files changed
+359 -97

No files matched your search

+21 -3
View File
@@ -5,12 +5,30 @@ export interface CardProps {
children: React.ReactNode;
className?: string;
padding?: 'sm' | 'md' | 'lg';
header?: React.ReactNode;
headerVariant?: 'primary' | 'secondary';
footer?: React.ReactNode;
}
export function Card({ children, className, padding = 'md' }: CardProps) {
export function Card({
children,
className,
padding = 'md',
header,
headerVariant = 'primary',
footer,
}: CardProps) {
return (
<div className={[styles.card, styles[padding], className].filter(Boolean).join(' ')}>
{children}
<div
className={[styles.card, footer !== undefined ? styles.withFooter : '', className]
.filter(Boolean)
.join(' ')}
>
{header !== undefined && (
<div className={[styles.header, styles[`header-${headerVariant}`]].join(' ')}>{header}</div>
)}
<div className={[styles.body, styles[padding]].join(' ')}>{children}</div>
{footer !== undefined && <div className={styles.footer}>{footer}</div>}
</div>
);
}