Skip to content

Commit

Permalink
Style background of editor area
Browse files Browse the repository at this point in the history
  • Loading branch information
Brayden committed Oct 20, 2024
1 parent 328acd1 commit 1adabab
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ body {
}

.dark {
--background: #000;
--background: #0a0a0a;
--foreground: #aaa;

--color-surface: black;
Expand Down
2 changes: 1 addition & 1 deletion src/components/gui/save-doc-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default function SaveDocButton({
{loading ? (
<LucideLoader className="w-4 h-4 animate-spin mr-2" />
) : (
<LucideSave className="w-4 h-4 mr-2" />
<></>
)}
Save
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/components/gui/sql-editor/use-editor-theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createTheme } from "@uiw/codemirror-themes";
import { useMemo } from "react";

export default function useCodeEditorTheme({
fontSize = 1,
fontSize = 0.875,
}: {
fontSize?: number;
}) {
Expand Down
12 changes: 8 additions & 4 deletions src/components/gui/tabs/query-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function QueryWindow({
const [code, setCode] = useState(initialCode ?? "");
const editorRef = useRef<ReactCodeMirrorRef>(null);

const [fontSize, setFontSize] = useState(1);
const [fontSize, setFontSize] = useState(0.875);
const [lineNumber, setLineNumber] = useState(0);
const [columnNumber, setColumnNumber] = useState(0);

Expand Down Expand Up @@ -288,7 +288,7 @@ export default function QueryWindow({
</div>
</div>
</div>
<div className="grow overflow-hidden p-2">
<div className="grow overflow-hidden p-2 dark:bg-neutral-950 bg-neutral-50">
<SqlEditor
ref={editorRef}
dialect={databaseDriver.getFlags().dialect}
Expand Down Expand Up @@ -322,8 +322,12 @@ export default function QueryWindow({

<Tooltip>
<TooltipTrigger asChild>
<Button variant={"ghost"} size="sm" onClick={onFormatClicked}>
<LucidePencilRuler className="w-4 h-4 mr-2" />
<Button
variant={"ghost"}
size="sm"
onClick={onFormatClicked}
className="text-neutral-800 dark:text-neutral-200"
>
Format
</Button>
</TooltipTrigger>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const buttonVariants = cva(
outline:
"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
secondary:
"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
"bg-neutral-200/75 dark:bg-neutral-800/75 text-secondary-foreground shadow-sm hover:bg-neutral-200 hover:dark:bg-neutral-800",
ghost: "hover:bg-accent hover:text-accent-foreground",
link: "text-primary underline-offset-4 hover:underline",
},
Expand Down

0 comments on commit 1adabab

Please sign in to comment.