You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add `currentWidth` and `onResizeEnd` props to PageLayout.Pane for controlled resizable width
6
+
7
+
The `PageLayout.Pane` component now supports controlled width:
8
+
9
+
-`onResizeEnd` — callback fired when a resize operation ends (pointer release or keyboard key up). Replaces localStorage persistence. Requires `currentWidth`.
10
+
-`currentWidth` — sets the current displayed width in pixels (`number | undefined`). Pass `undefined` when the persisted value hasn't loaded yet. Requires `onResizeEnd`.
11
+
12
+
Both props must be provided together (enforced by TypeScript). `resizable` remains a plain `boolean` prop.
13
+
14
+
These props are only meaningful when `resizable={true}` — without it, no drag handle renders so `onResizeEnd` never fires.
15
+
16
+
**New export:**
17
+
18
+
-`defaultPaneWidth` — Record of preset width values: `{small: 256, medium: 296, large: 320}`
Copy file name to clipboardExpand all lines: packages/mcp/src/server.ts
+22-13Lines changed: 22 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -111,12 +111,27 @@ server.registerTool(
111
111
})
112
112
if(!match){
113
113
return{
114
-
content: [
115
-
{
116
-
type: 'text',
117
-
text: `There is no component named \`${name}\` in the @primer/react package. For a full list of components, use the \`list_components\` tool.`,
118
-
},
119
-
],
114
+
isError: true,
115
+
errorMessage: `There is no component named \`${name}\` in the @primer/react package. For a full list of components, use the \`list_components\` tool.`,
0 commit comments