Add the shape lock button for mobile (#1054)

This commit is contained in:
Sanghyeon Lee
2020-03-24 19:51:49 +09:00
committed by GitHub
parent e38045ccad
commit 104e48b6cb
5 changed files with 43 additions and 15 deletions

View File

@@ -33,7 +33,7 @@ interface LayerUIProps {
setElements: (elements: readonly ExcalidrawElement[]) => void;
onRoomCreate: () => void;
onRoomDestroy: () => void;
onToggleLock: () => void;
onLockToggle: () => void;
}
export const LayerUI = React.memo(
@@ -47,7 +47,7 @@ export const LayerUI = React.memo(
setElements,
onRoomCreate,
onRoomDestroy,
onToggleLock,
onLockToggle,
}: LayerUIProps) => {
const isMobile = useIsMobile();
@@ -101,6 +101,7 @@ export const LayerUI = React.memo(
setAppState={setAppState}
onRoomCreate={onRoomCreate}
onRoomDestroy={onRoomDestroy}
onLockToggle={onLockToggle}
/>
) : (
<>
@@ -159,9 +160,8 @@ export const LayerUI = React.memo(
</Island>
<LockIcon
checked={appState.elementLocked}
onChange={onToggleLock}
onChange={onLockToggle}
title={t("toolBar.lock")}
isButton={isMobile}
/>
</Stack.Row>
</Stack.Col>