From 338116fbd42fa12aad7c61fbdc5224b4916ecbb3 Mon Sep 17 00:00:00 2001 From: pashpashpash Date: Sat, 15 Feb 2025 17:23:08 -0800 Subject: [PATCH] consistent spacing with flexbox gap --- webview-ui/src/components/mcp/McpView.tsx | 2 +- .../mcp/marketplace/McpMarketplaceCard.tsx | 84 +++++++++++-------- .../mcp/marketplace/McpMarketplaceView.tsx | 5 +- 3 files changed, 50 insertions(+), 41 deletions(-) diff --git a/webview-ui/src/components/mcp/McpView.tsx b/webview-ui/src/components/mcp/McpView.tsx index c3f615efaa..f05f4d0546 100644 --- a/webview-ui/src/components/mcp/McpView.tsx +++ b/webview-ui/src/components/mcp/McpView.tsx @@ -112,7 +112,7 @@ const McpView = ({ onDone }: McpViewProps) => { style={{ display: "flex", gap: "1px", - padding: "0 8px 0 10px", + padding: "0 20px 0 20px", borderBottom: "1px solid var(--vscode-panel-border)", }}> setActiveTab("marketplace")}> diff --git a/webview-ui/src/components/mcp/marketplace/McpMarketplaceCard.tsx b/webview-ui/src/components/mcp/marketplace/McpMarketplaceCard.tsx index 32c566f8a4..dae8fa70ff 100644 --- a/webview-ui/src/components/mcp/marketplace/McpMarketplaceCard.tsx +++ b/webview-ui/src/components/mcp/marketplace/McpMarketplaceCard.tsx @@ -57,33 +57,43 @@ const McpMarketplaceCard = ({ item, installedServers }: McpMarketplaceCardProps) }) }} style={{ - padding: "12px 16px", + padding: "16px 20px", + display: "flex", + flexDirection: "column", + gap: 16, cursor: isLoading ? "wait" : "pointer", }}> {/* Main container with logo and content */} -
+
{/* Logo */} {item.logoUrl && ( {`${item.name} )} {/* Content section */} -
+
{/* First row: name and install button */}

-
- +
+ { + e.currentTarget.style.opacity = "0.8" + }} + onMouseLeave={(e) => { + e.currentTarget.style.opacity = "0.5" + }}> + + +
+ { - e.currentTarget.style.opacity = "0.8" - }} - onMouseLeave={(e) => { - e.currentTarget.style.opacity = "0.5" }}> - -
+ {item.author} +
- - {item.author} - |
{/* Description and tags */} -
-

{item.description}

+
+

{item.description}

{ flexDirection: "column", width: "100%", }}> -
+
{/* Search row */} { className="codicon codicon-search" style={{ fontSize: 13, - marginTop: 2.5, opacity: 0.8, }} /> @@ -204,7 +203,6 @@ const McpMarketplaceView = () => { display: "flex", alignItems: "center", gap: "8px", - marginTop: "8px", }}> { style={{ display: "flex", gap: "8px", - marginTop: "8px", }}>