feat(client): add create/edit environment pages and hoverable cards
- add CreateEnvironmentPage and EditEnvironmentPage with pre-filled form - add /environments/new and /environments/:id/edit routes - add Edit option to card context menu and detail page toolbar - move env id pill to card footer (left), timestamp stays right - make env cards clickable (navigate to detail); cog stops propagation - add hoverable Card variant with primary border+shadow on hover - add link color tokens and global anchor styles for both themes - fix Timestamp pill visibility in dark mode with border token - add DescriptionList truncate prop with ellipsis and title tooltip - stack DescriptionList dd below dt with 8px gap between items
This commit is contained in:
@@ -47,3 +47,12 @@
|
||||
.sm { padding: var(--space-3) var(--space-4); }
|
||||
.md { padding: var(--space-4) var(--space-6); }
|
||||
.lg { padding: var(--space-6) var(--space-8); }
|
||||
|
||||
.hoverable {
|
||||
cursor: pointer;
|
||||
transition: border-color var(--transition), box-shadow var(--transition);
|
||||
}
|
||||
.hoverable:hover {
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: var(--shadow-sm), 0 0 0 1px var(--color-primary);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ export interface CardProps {
|
||||
header?: React.ReactNode;
|
||||
headerVariant?: 'primary' | 'secondary';
|
||||
footer?: React.ReactNode;
|
||||
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
||||
}
|
||||
|
||||
export function Card({
|
||||
@@ -17,10 +18,17 @@ export function Card({
|
||||
header,
|
||||
headerVariant = 'primary',
|
||||
footer,
|
||||
onClick,
|
||||
}: CardProps) {
|
||||
return (
|
||||
<div
|
||||
className={[styles.card, footer !== undefined ? styles.withFooter : '', className]
|
||||
onClick={onClick}
|
||||
className={[
|
||||
styles.card,
|
||||
footer !== undefined ? styles.withFooter : '',
|
||||
onClick ? styles.hoverable : '',
|
||||
className,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user