feat(#bru-22): prettify graphql placement and styling (#1675)

This commit is contained in:
lohit 2024-02-27 21:14:08 +05:30 committed by GitHub
parent 01360d1522
commit f64e13a71f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,6 +14,7 @@ import { getAllVariables } from 'utils/collections';
import { defineCodeMirrorBrunoVariablesMode } from 'utils/common/codemirror';
import toast from 'react-hot-toast';
import StyledWrapper from './StyledWrapper';
import { IconWand } from '@tabler/icons';
import onHasCompletion from './onHasCompletion';
@ -207,14 +208,17 @@ export default class QueryEditor extends React.Component {
return (
<>
<StyledWrapper
className="h-full w-full"
className="h-full w-full relative"
aria-label="Query Editor"
ref={(node) => {
this._node = node;
}}
>
<button className="btn-add-param text-link pr-2 py-3 mt-2 select-none" onClick={this.beautifyRequestBody}>
Prettify GraphQL
<button
className="btn-add-param text-link px-4 py-4 select-none absolute top-0 right-0 z-10"
onClick={this.beautifyRequestBody}
>
<IconWand />
</button>
</StyledWrapper>
</>