Skip to content

Commit

Permalink
overflow to markdown editor component
Browse files Browse the repository at this point in the history
  • Loading branch information
samlhuillier committed Nov 29, 2023
1 parent 234e57d commit ee1dbf9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/File/MakdownEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ interface FileEditorProps {
lastSavedContentRef: React.MutableRefObject<string>;
}

export const FileEditor: React.FC<FileEditorProps> = ({
export const MarkdownEditor: React.FC<FileEditorProps> = ({
filePath,
// content,
setContentInParent,
Expand Down Expand Up @@ -81,7 +81,7 @@ export const FileEditor: React.FC<FileEditorProps> = ({
}, [content]);

return (
<div className="">
<div className="h-full overflow-y-auto">
{/* <button onClick={() => ref.current?.setMarkdown("new markdown")}>
Set new markdown
</button>
Expand Down
8 changes: 4 additions & 4 deletions src/components/FileEditorContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useRef, useState } from "react";
import { FileSidebar } from "./File/FileSidebar";
import { FileEditor } from "./File/FileEditor";
import { MarkdownEditor } from "./File/MakdownEditor";
import SimilarEntriesComponent from "./Similarity/SimilarFilesSidebar";
import TitleBar from "./TitleBar";
import ChatWithLLM from "./Chat/Chat";
Expand Down Expand Up @@ -50,9 +50,9 @@ const FileEditorContainer: React.FC<FileEditorContainerProps> = ({}) => {
className="w-full h-full flex overflow-x-hidden"
style={{ marginRight: showChatbot ? "250px" : "0" }}
>
<div className="w-full flex ">
<div className="w-[75%]">
<FileEditor
<div className="w-full flex h-full">
<div className="w-[75%] h-full">
<MarkdownEditor
filePath={selectedFilePath}
setContentInParent={setEditorContent}
lastSavedContentRef={lastSavedContentRef}
Expand Down

0 comments on commit ee1dbf9

Please sign in to comment.