refine UI layout, theming, and component consistency across screens
- Add MCP logo (light/dark variants) to ConnectedLayout header - Replace Tabs with SegmentedControl in header, split into 1/3 sections - Wrap all screens in Container for consistent margins - Use Card instead of Paper for panel backgrounds across all screens - Add SubscribeButton atom, CopyButton for resource URI - Move annotations from ResourceListItem to ResourcePreviewPanel - Improve AnnotationBadge colors for dark mode visibility - Add Tools, Resources, and Prompts headers to list panels - Add ConnectedLayout stories for Tools, Resources, and Prompts tabs - Remove unused onCopy prop and copy button from PromptMessagesDisplay Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
08c42a2e62
commit
f674ce0c22
1 changed files with 357 additions and 157 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Badge } from "@mantine/core";
|
||||
import { Badge, useComputedColorScheme } from "@mantine/core";
|
||||
|
||||
export type AnnotationVariant =
|
||||
| "audience"
|
||||
|
|
@ -17,11 +17,11 @@ const variantMap: Record<
|
|||
AnnotationVariant,
|
||||
{ color: string; variant: string }
|
||||
> = {
|
||||
audience: { color: "gray", variant: "outline" },
|
||||
readOnly: { color: "dark", variant: "filled" },
|
||||
destructive: { color: "red", variant: "outline" },
|
||||
longRun: { color: "yellow", variant: "outline" },
|
||||
priority: { color: "orange", variant: "light" },
|
||||
audience: { color: "blue", variant: "outline" },
|
||||
readOnly: { color: "green", variant: "filled" },
|
||||
destructive: { color: "red", variant: "filled" },
|
||||
longRun: { color: "yellow", variant: "filled" },
|
||||
priority: { color: "orange", variant: "filled" },
|
||||
default: { color: "gray", variant: "light" },
|
||||
};
|
||||
|
||||
|
|
@ -29,10 +29,13 @@ export function AnnotationBadge({
|
|||
label,
|
||||
variant = "default",
|
||||
}: AnnotationBadgeProps) {
|
||||
const colorScheme = useComputedColorScheme();
|
||||
const { color, variant: badgeVariant } = variantMap[variant];
|
||||
const textColor =
|
||||
(variant === "priority" || variant === "destructive") && colorScheme === "dark" ? "black" : undefined;
|
||||
|
||||
return (
|
||||
<Badge color={color} variant={badgeVariant}>
|
||||
<Badge color={color} variant={badgeVariant} c={textColor}>
|
||||
{label}
|
||||
</Badge>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue