Fix header editor and scroll in general

This commit is contained in:
Gregory Schier
2023-03-13 19:37:36 -07:00
parent e2fa188ca3
commit d7ff52038d
13 changed files with 47 additions and 46 deletions

View File

@@ -134,19 +134,6 @@
}
}
.cm-scroller, .cm-tooltip-autocomplete > ul {
&::-webkit-scrollbar-corner,
&::-webkit-scrollbar {
@apply w-1.5 h-1.5 bg-transparent;
}
&::-webkit-scrollbar-thumb {
@apply bg-gray-200 hover:bg-gray-300 rounded-full;
}
}
/* <-- */
/* NOTE: Extra selector required to override default styles */
.cm-tooltip.cm-tooltip {
@apply shadow-lg bg-gray-50 rounded overflow-hidden text-gray-900 border border-gray-200 z-50 pointer-events-auto;

View File

@@ -5,7 +5,8 @@ import classnames from 'classnames';
import { EditorView } from 'codemirror';
import { formatSdl } from 'format-graphql';
import { useEffect, useRef } from 'react';
import { useUnmount } from 'react-use';
import { useDebounce, useUnmount } from 'react-use';
import { debounce } from '../../lib/debounce';
import { IconButton } from '../IconButton';
import './Editor.css';
import { baseExtensions, getLanguageExtension, multiLineExtensions } from './extensions';
@@ -96,7 +97,7 @@ export function _Editor({
readOnly && 'cm-readonly',
)}
>
{contentType?.includes("graphql") && (
{contentType?.includes('graphql') && (
<IconButton
icon="eye"
className="absolute right-3 bottom-3 z-10"