Skip to content

Commit efe7363

Browse files
committed
fix: improve MCP settings buttons layout for responsive design
- Add flexWrap to button container to allow wrapping on smaller screens - Change buttons from fixed flex:1 to flex: 1 1 auto with minWidth - Ensures buttons maintain minimum readable width of 120px - Prevents button text from being truncated on narrow viewports
1 parent cdce3b0 commit efe7363

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

webview-ui/src/components/mcp/McpView.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,17 @@ const McpView = ({ onDone }: McpViewProps) => {
119119
)}
120120

121121
{/* Edit Settings Buttons */}
122-
<div style={{ marginTop: "10px", width: "100%", display: "flex", gap: "10px" }}>
122+
<div
123+
style={{
124+
marginTop: "10px",
125+
width: "100%",
126+
display: "flex",
127+
flexWrap: "wrap",
128+
gap: "10px",
129+
}}>
123130
<Button
124131
variant="secondary"
125-
style={{ flex: 1 }}
132+
style={{ flex: "1 1 auto", minWidth: "120px" }}
126133
onClick={() => {
127134
vscode.postMessage({ type: "openMcpSettings" })
128135
}}>
@@ -131,7 +138,7 @@ const McpView = ({ onDone }: McpViewProps) => {
131138
</Button>
132139
<Button
133140
variant="secondary"
134-
style={{ flex: 1 }}
141+
style={{ flex: "1 1 auto", minWidth: "120px" }}
135142
onClick={() => {
136143
vscode.postMessage({ type: "openProjectMcpSettings" })
137144
}}>
@@ -140,7 +147,7 @@ const McpView = ({ onDone }: McpViewProps) => {
140147
</Button>
141148
<Button
142149
variant="secondary"
143-
style={{ flex: 1 }}
150+
style={{ flex: "1 1 auto", minWidth: "120px" }}
144151
onClick={() => {
145152
vscode.postMessage({ type: "refreshAllMcpServers" })
146153
}}>

0 commit comments

Comments
 (0)