From 104e48b6cb257be53c58f9f88d2b3374f650c7f6 Mon Sep 17 00:00:00 2001 From: Sanghyeon Lee Date: Tue, 24 Mar 2020 19:51:49 +0900 Subject: [PATCH] Add the shape lock button for mobile (#1054) --- src/components/App.tsx | 2 +- src/components/LayerUI.tsx | 8 ++++---- src/components/LockIcon.tsx | 5 +---- src/components/MobileMenu.tsx | 8 ++++++++ src/components/ToolIcon.scss | 35 +++++++++++++++++++++++++++++------ 5 files changed, 43 insertions(+), 15 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index a37f7530a856..5bf550a01279 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -190,7 +190,7 @@ export class App extends React.Component { language={getLanguage()} onRoomCreate={this.createRoom} onRoomDestroy={this.destroyRoom} - onToggleLock={this.toggleLock} + onLockToggle={this.toggleLock} />
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( diff --git a/src/components/LockIcon.tsx b/src/components/LockIcon.tsx index e7aedd8f302d..1cde1f5357d8 100644 --- a/src/components/LockIcon.tsx +++ b/src/components/LockIcon.tsx @@ -12,7 +12,6 @@ type LockIconProps = { checked: boolean; onChange?(): void; size?: LockIconSize; - isButton?: boolean; }; const DEFAULT_SIZE: LockIconSize = "m"; @@ -46,9 +45,7 @@ export function LockIcon(props: LockIconProps) { return (