mirror of
https://github.com/muerwre/markdown-home-tab.git
synced 2025-04-25 08:56:41 +07:00
made human-friendly editing buttons
This commit is contained in:
parent
6d854f57a5
commit
02333e6049
15 changed files with 175 additions and 28 deletions
|
@ -5,8 +5,7 @@ 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 Locked from "~/assets/images/locked.svg";
|
||||
import Unlocked from "~/assets/images/unlocked.svg";
|
||||
import Gear from "~/assets/images/gear.svg";
|
||||
|
||||
type GridLayoutItemWrapperProps = PropsWithChildren & {
|
||||
splitVertical: () => void;
|
||||
|
@ -24,7 +23,6 @@ const GridLayoutItemWrapper: FC<GridLayoutItemWrapperProps> = ({
|
|||
showSettings,
|
||||
remove,
|
||||
locked,
|
||||
lock,
|
||||
}) => (
|
||||
<div className={styles.wrapper}>
|
||||
<div className={styles.menu}>
|
||||
|
@ -49,7 +47,7 @@ const GridLayoutItemWrapper: FC<GridLayoutItemWrapperProps> = ({
|
|||
role="button"
|
||||
className={styles.button}
|
||||
>
|
||||
S
|
||||
<Gear />
|
||||
</IconButton>
|
||||
|
||||
{!locked && (
|
||||
|
@ -57,10 +55,6 @@ const GridLayoutItemWrapper: FC<GridLayoutItemWrapperProps> = ({
|
|||
<DeleteIcon />
|
||||
</IconButton>
|
||||
)}
|
||||
|
||||
<IconButton onClick={lock} role="button" className={styles.button}>
|
||||
{locked ? <Locked /> : <Unlocked />}
|
||||
</IconButton>
|
||||
</div>
|
||||
|
||||
{children}
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
top: 2px;
|
||||
right: 4px;
|
||||
transition: all 0.25s;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.button {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue