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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 43 additions and 15 deletions

View file

@ -14,6 +14,7 @@ import { SelectedShapeActions, ShapesSwitcher } from "./Actions";
import { Section } from "./Section";
import { RoomDialog } from "./RoomDialog";
import { SCROLLBAR_WIDTH, SCROLLBAR_MARGIN } from "../scene/scrollbars";
import { LockIcon } from "./LockIcon";
type MobileMenuProps = {
appState: AppState;
@ -24,6 +25,7 @@ type MobileMenuProps = {
setElements: any;
onRoomCreate: () => void;
onRoomDestroy: () => void;
onLockToggle: () => void;
};
export function MobileMenu({
@ -35,6 +37,7 @@ export function MobileMenu({
setAppState,
onRoomCreate,
onRoomDestroy,
onLockToggle,
}: MobileMenuProps) {
return (
<>
@ -54,6 +57,11 @@ export function MobileMenu({
/>
</Stack.Row>
</Island>
<LockIcon
checked={appState.elementLocked}
onChange={onLockToggle}
title={t("toolBar.lock")}
/>
</Stack.Row>
</Stack.Col>
)}