diff --git a/src/modules/editor/components/EditorWrapper/index.tsx b/src/modules/editor/components/EditorWrapper/index.tsx index 7a6b544..e4336fa 100644 --- a/src/modules/editor/components/EditorWrapper/index.tsx +++ b/src/modules/editor/components/EditorWrapper/index.tsx @@ -1,20 +1,25 @@ import { FC, PropsWithChildren } from "react"; import styles from "./styles.module.scss"; import { Button } from "~/components/buttons/Button"; -import { useContainerPaddings } from "~/modules/theme/hooks/useContainerPaddings"; interface EditorWrapperProps extends PropsWithChildren { - onSave: () => void; + save: () => void; + remove: () => void; } -const EditorWrapper: FC = ({ children, onSave }) => { +const EditorWrapper: FC = ({ children, save, remove }) => { return (
{children}
+ +
-
diff --git a/src/modules/editor/containers/MarkdownEditorContainer/index.tsx b/src/modules/editor/containers/MarkdownEditorContainer/index.tsx index 9673dd0..8735a94 100644 --- a/src/modules/editor/containers/MarkdownEditorContainer/index.tsx +++ b/src/modules/editor/containers/MarkdownEditorContainer/index.tsx @@ -11,6 +11,7 @@ interface MarkdownEditorContainerProps { id: string; locked: boolean; startEditing: () => void; + remove: () => void; } const RichEditor = lazy(() => @@ -23,6 +24,7 @@ export const MarkdownEditorContainer: FC = ({ id, locked, startEditing, + remove, }) => { const { settings: { richEditorEnabled }, @@ -39,7 +41,7 @@ export const MarkdownEditorContainer: FC = ({ ); const editor = ( - + {richEditorEnabled ? ( ) : ( diff --git a/src/modules/layout/components/GridLayout/index.tsx b/src/modules/layout/components/GridLayout/index.tsx index e567d09..06f4b8e 100644 --- a/src/modules/layout/components/GridLayout/index.tsx +++ b/src/modules/layout/components/GridLayout/index.tsx @@ -54,9 +54,6 @@ const DefaultLayout = ({ {createElement(component, { @@ -64,6 +61,7 @@ const DefaultLayout = ({ title: panelProps.params.title, locked, startEditing: lock, + remove, })} ); diff --git a/src/modules/layout/components/GridLayoutItemWrapper/index.tsx b/src/modules/layout/components/GridLayoutItemWrapper/index.tsx index d2ba43a..37de815 100644 --- a/src/modules/layout/components/GridLayoutItemWrapper/index.tsx +++ b/src/modules/layout/components/GridLayoutItemWrapper/index.tsx @@ -2,7 +2,6 @@ import { FC, PropsWithChildren } from "react"; import styles from "./styles.module.scss"; import { IconButton } from "~/components/buttons/IconButton"; -import DeleteIcon from "~/assets/images/delete.svg"; import SplitVertical from "~/assets/images/split-vertical.svg"; import SplitHorizontal from "~/assets/images/split-horizontal.svg"; import Gear from "~/assets/images/gear.svg"; @@ -10,9 +9,6 @@ import Gear from "~/assets/images/gear.svg"; type GridLayoutItemWrapperProps = PropsWithChildren & { splitVertical: () => void; splitHorizontal: () => void; - remove: () => void; - locked: boolean; - lock: () => void; showSettings: () => void; }; @@ -21,8 +17,6 @@ const GridLayoutItemWrapper: FC = ({ splitVertical, splitHorizontal, showSettings, - remove, - locked, }) => (
@@ -49,12 +43,6 @@ const GridLayoutItemWrapper: FC = ({ > - - {!locked && ( - - - - )}
{children} diff --git a/src/modules/layout/types/index.ts b/src/modules/layout/types/index.ts index 6221c2a..9d14d8c 100644 --- a/src/modules/layout/types/index.ts +++ b/src/modules/layout/types/index.ts @@ -3,4 +3,5 @@ export interface GridLayoutComponentProps { title: string; locked: boolean; startEditing: () => void; + remove: () => void; }