Skip to content

Commit

Permalink
change icon when in editing mode (fix #305)
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscoBSalgueiro committed May 22, 2024
1 parent 345bc43 commit 720512c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/boards/Board.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ import {
Tooltip,
useMantineTheme,
} from "@mantine/core";
import { useElementSize } from "@mantine/hooks";
import { notifications } from "@mantine/notifications";
import {
IconArrowBack,
IconChevronRight,
IconDeviceFloppy,
IconEdit,
IconEditOff,
IconPlus,
IconSwitchVertical,
IconTarget,
Expand Down Expand Up @@ -327,11 +327,15 @@ function Board({
{!disableVariations && (
<Tooltip label="Edit Position">
<ActionIcon
variant="default"
variant={editingMode ? "filled" : "default"}
size="lg"
onClick={() => toggleEditingMode()}
>
<IconEdit size="1.3rem" />
{editingMode ? (
<IconEditOff size="1.3rem" />
) : (
<IconEdit size="1.3rem" />
)}
</ActionIcon>
</Tooltip>
)}
Expand Down

0 comments on commit 720512c

Please sign in to comment.