mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
26 lines
2 KiB
Diff
26 lines
2 KiB
Diff
|
|
# move prettify button to the end, we can't use `<GraphiQL.Toolbar />` 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);
|
||
|
|
});
|