Browse Source

134432 change spell to openTableModal

soumaeda 2 years ago
parent
commit
97e17f4126

+ 1 - 1
apps/app/src/components/PageEditor/PageEditor.tsx

@@ -594,7 +594,7 @@ export const PageEditor = React.memo((props: Props): JSX.Element => {
             onUpload={uploadHandler}
             indentSize={currentIndentSize ?? defaultIndentSize}
             acceptedFileType={acceptedFileType}
-            openTabelModal={openTableModalHandler}
+            openTableModal={openTableModalHandler}
           />
         </div>
         <div className="page-editor-preview-container flex-expand-vert d-none d-lg-flex">

+ 3 - 3
packages/editor/src/components/CodeMirrorEditor/CodeMirrorEditor.tsx

@@ -26,7 +26,7 @@ type Props = {
   onChange?: (value: string) => void,
   onUpload?: (files: File[]) => void,
   indentSize?: number,
-  openTabelModal?: () => void,
+  openTableModal?: () => void,
 }
 
 export const CodeMirrorEditor = (props: Props): JSX.Element => {
@@ -36,7 +36,7 @@ export const CodeMirrorEditor = (props: Props): JSX.Element => {
     onChange,
     onUpload,
     indentSize,
-    openTabelModal,
+    openTableModal,
   } = props;
 
   const containerRef = useRef(null);
@@ -148,7 +148,7 @@ export const CodeMirrorEditor = (props: Props): JSX.Element => {
       <div {...getRootProps()} className={`dropzone ${fileUploadState} flex-expand-vert`}>
         <FileDropzoneOverlay isEnabled={isDragActive} />
         <CodeMirrorEditorContainer ref={containerRef} />
-        <Toolbar editorKey={editorKey} onFileOpen={open} acceptedFileType={acceptedFileType} openTabelModal={openTabelModal} />
+        <Toolbar editorKey={editorKey} onFileOpen={open} acceptedFileType={acceptedFileType} openTableModal={openTableModal} />
       </div>
     </div>
   );

+ 6 - 6
packages/editor/src/components/CodeMirrorEditor/Toolbar/TableButton.tsx

@@ -1,17 +1,17 @@
 type TableButtonProps = {
-  openTabelModal?: () => void;
+  openTableModal?: () => void;
 }
 
 export const TableButton = (props: TableButtonProps): JSX.Element => {
-  const { openTabelModal } = props;
-  const openTabelModalHandler = () => {
-    if (openTabelModal == null) {
+  const { openTableModal } = props;
+  const openTableModalHandler = () => {
+    if (openTableModal == null) {
       return;
     }
-    openTabelModal();
+    openTableModal();
   };
   return (
-    <button type="button" className="btn btn-toolbar-button" onClick={openTabelModalHandler}>
+    <button type="button" className="btn btn-toolbar-button" onClick={openTableModalHandler}>
       <span className="material-symbols-outlined fs-5">table_chart</span>
     </button>
   );

+ 3 - 3
packages/editor/src/components/CodeMirrorEditor/Toolbar/Toolbar.tsx

@@ -16,13 +16,13 @@ type Props = {
   editorKey: string,
   onFileOpen: () => void,
   acceptedFileType: AcceptedUploadFileType,
-  openTabelModal?: () => void,
+  openTableModal?: () => void,
 }
 
 export const Toolbar = memo((props: Props): JSX.Element => {
 
   const {
-    editorKey, onFileOpen, acceptedFileType, openTabelModal,
+    editorKey, onFileOpen, acceptedFileType, openTableModal,
   } = props;
 
   return (
@@ -32,7 +32,7 @@ export const Toolbar = memo((props: Props): JSX.Element => {
       <EmojiButton
         editorKey={editorKey}
       />
-      <TableButton openTabelModal={openTabelModal} />
+      <TableButton openTableModal={openTableModal} />
       <DiagramButton />
       <TemplateButton />
     </div>

+ 3 - 3
packages/editor/src/components/CodeMirrorEditorMain.tsx

@@ -19,12 +19,12 @@ type Props = {
   onUpload?: (files: File[]) => void,
   acceptedFileType?: AcceptedUploadFileType,
   indentSize?: number,
-  openTabelModal?: () => void,
+  openTableModal?: () => void,
 }
 
 export const CodeMirrorEditorMain = (props: Props): JSX.Element => {
   const {
-    onSave, onChange, onUpload, openTabelModal, acceptedFileType, indentSize,
+    onSave, onChange, onUpload, openTableModal, acceptedFileType, indentSize,
   } = props;
 
   const { data: codeMirrorEditor } = useCodeMirrorEditorIsolated(GlobalCodeMirrorEditorKey.MAIN);
@@ -68,7 +68,7 @@ export const CodeMirrorEditorMain = (props: Props): JSX.Element => {
       onUpload={onUpload}
       acceptedFileType={acceptedFileTypeNoOpt}
       indentSize={indentSize}
-      openTabelModal={openTabelModal}
+      openTableModal={openTableModal}
     />
   );
 };