mirror of
https://github.com/muerwre/markdown-home-tab.git
synced 2025-04-25 08:56:41 +07:00
moved delete button to editor
This commit is contained in:
parent
02333e6049
commit
ece7395b26
5 changed files with 14 additions and 20 deletions
|
@ -54,9 +54,6 @@ const DefaultLayout = ({
|
|||
<GridLayoutItemWrapper
|
||||
splitVertical={splitVertical}
|
||||
splitHorizontal={splitHorizontal}
|
||||
remove={remove}
|
||||
locked={locked}
|
||||
lock={lock}
|
||||
showSettings={showSettings}
|
||||
>
|
||||
{createElement(component, {
|
||||
|
@ -64,6 +61,7 @@ const DefaultLayout = ({
|
|||
title: panelProps.params.title,
|
||||
locked,
|
||||
startEditing: lock,
|
||||
remove,
|
||||
})}
|
||||
</GridLayoutItemWrapper>
|
||||
);
|
||||
|
|
|
@ -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<GridLayoutItemWrapperProps> = ({
|
|||
splitVertical,
|
||||
splitHorizontal,
|
||||
showSettings,
|
||||
remove,
|
||||
locked,
|
||||
}) => (
|
||||
<div className={styles.wrapper}>
|
||||
<div className={styles.menu}>
|
||||
|
@ -49,12 +43,6 @@ const GridLayoutItemWrapper: FC<GridLayoutItemWrapperProps> = ({
|
|||
>
|
||||
<Gear />
|
||||
</IconButton>
|
||||
|
||||
{!locked && (
|
||||
<IconButton onClick={remove} role="button" className={styles.button}>
|
||||
<DeleteIcon />
|
||||
</IconButton>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{children}
|
||||
|
|
|
@ -3,4 +3,5 @@ export interface GridLayoutComponentProps {
|
|||
title: string;
|
||||
locked: boolean;
|
||||
startEditing: () => void;
|
||||
remove: () => void;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue