mirror of
https://github.com/muerwre/markdown-home-tab.git
synced 2025-04-25 00:46:41 +07:00
added new editor, locking, props persistance
This commit is contained in:
parent
0940d6abf8
commit
601eda17de
22 changed files with 2860 additions and 123 deletions
|
@ -5,13 +5,15 @@ 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";
|
||||
|
||||
console.log(DeleteIcon);
|
||||
import Locked from "~/assets/images/locked.svg";
|
||||
import Unlocked from "~/assets/images/unlocked.svg";
|
||||
|
||||
type GridLayoutItemWrapperProps = PropsWithChildren & {
|
||||
splitVertical: () => void;
|
||||
splitHorizontal: () => void;
|
||||
remove: () => void;
|
||||
locked: boolean;
|
||||
lock: () => void;
|
||||
};
|
||||
|
||||
const GridLayoutItemWrapper: FC<GridLayoutItemWrapperProps> = ({
|
||||
|
@ -19,25 +21,34 @@ const GridLayoutItemWrapper: FC<GridLayoutItemWrapperProps> = ({
|
|||
splitVertical,
|
||||
splitHorizontal,
|
||||
remove,
|
||||
locked,
|
||||
lock,
|
||||
}) => (
|
||||
<div className={styles.wrapper}>
|
||||
<div className={styles.menu}>
|
||||
<IconButton
|
||||
onClick={splitVertical}
|
||||
role="button"
|
||||
className={styles.button}
|
||||
>
|
||||
<SplitVertical />
|
||||
</IconButton>
|
||||
<IconButton
|
||||
onClick={splitHorizontal}
|
||||
role="button"
|
||||
className={styles.button}
|
||||
>
|
||||
<SplitHorizontal />
|
||||
</IconButton>
|
||||
<IconButton onClick={remove} role="button" className={styles.button}>
|
||||
<DeleteIcon />
|
||||
{!locked && (
|
||||
<>
|
||||
<IconButton
|
||||
onClick={splitVertical}
|
||||
role="button"
|
||||
className={styles.button}
|
||||
>
|
||||
<SplitVertical />
|
||||
</IconButton>
|
||||
<IconButton
|
||||
onClick={splitHorizontal}
|
||||
role="button"
|
||||
className={styles.button}
|
||||
>
|
||||
<SplitHorizontal />
|
||||
</IconButton>
|
||||
<IconButton onClick={remove} role="button" className={styles.button}>
|
||||
<DeleteIcon />
|
||||
</IconButton>
|
||||
</>
|
||||
)}
|
||||
<IconButton onClick={lock} role="button" className={styles.button}>
|
||||
{locked ? <Locked /> : <Unlocked />}
|
||||
</IconButton>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue