# move prettify button to the end, we can't use `` because `usePrettifyEditors` needs to access `EditorContextProvider` # diff --git a/esm/components/GraphiQL.js b/esm/components/GraphiQL.js index adf5b7dfc4d292391c5f3c20d7082984529062d9..e8d32614459dd0e9ee484ce278b8ce4f3a9e7d35 100644 --- a/esm/components/GraphiQL.js +++ b/esm/components/GraphiQL.js @@ -139,14 +139,10 @@ export function GraphiQLInterface(props) { var toolbar = children.find(function (child) { return isChildComponentType(child, GraphiQL.Toolbar); }) || (React.createElement(React.Fragment, null, - React.createElement(ToolbarButton, { onClick: prettify, label: "Prettify query (Shift-Ctrl-P)" }, - React.createElement(PrettifyIcon, { className: "graphiql-toolbar-icon", "aria-hidden": "true" })), - React.createElement(ToolbarButton, { onClick: merge, label: "Merge fragments into query (Shift-Ctrl-M)" }, - React.createElement(MergeIcon, { className: "graphiql-toolbar-icon", "aria-hidden": "true" })), - React.createElement(ToolbarButton, { onClick: copy, label: "Copy query (Shift-Ctrl-C)" }, - React.createElement(CopyIcon, { className: "graphiql-toolbar-icon", "aria-hidden": "true" })), (_c = props.toolbar) === null || _c === void 0 ? void 0 : - _c.additionalContent, - ((_d = props.toolbar) === null || _d === void 0 ? void 0 : _d.additionalComponent) && (React.createElement(props.toolbar.additionalComponent, null)))); + (_c = props.toolbar) === null || _c === void 0 ? void 0 : _c.additionalContent, + ((_d = props.toolbar) === null || _d === void 0 ? void 0 : _d.additionalComponent) && (React.createElement(props.toolbar.additionalComponent, null)), + React.createElement(ToolbarButton, { onClick: prettify, label: "Prettify query (Shift-Ctrl-P)" }, React.createElement(PrettifyIcon, { className: "graphiql-toolbar-icon", "aria-hidden": "true" })) + )); var footer = children.find(function (child) { return isChildComponentType(child, GraphiQL.Footer); });