Skip to content

Commit

Permalink
improve editor padding
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianChiarulli committed Jul 7, 2024
1 parent c77d425 commit 6bae9e6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/editor/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const Editor = () => {
});

return (
<div className="h-full w-full overflow-auto pl-4" ref={editorRef}></div>
<div className="h-full w-full overflow-auto" ref={editorRef}></div>
);
};

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/editor/EditorWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const EditorWrapper = () => {
}

return (
<div className="flex h-full flex-col pt-10">
<div className="flex h-full flex-col pt-12">
{!showPreview && <Editor />}
{showPreview && <Preview />}
<div className="fixed bottom-[3.75rem] right-2.5 p-2">
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/editor/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export const Preview = () => {
const { activeNote, activeTrashNote } = useAppState();

return (
<div className="h-full w-full overflow-auto py-1 pl-4">
<div className="h-full w-full overflow-auto py-1">
<MarkdownPreview
source={activeNote?.Content || activeTrashNote?.Content || ""}
className="pl-1.5 pr-0.5"
className="px-8"
rehypePlugins={rehypePlugins}
/>
</div>
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lib/codemirror/theme/dark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const darkTheme = EditorView.theme({
".cm-content": {
fontFamily: "monospace",
lineHeight: "2",
paddingLeft: "2rem",
paddingRight: "2rem",
caretColor: "white !important",
},
".cm-gutters": {
Expand Down

0 comments on commit 6bae9e6

Please sign in to comment.