mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Add the shape lock button for mobile (#1054)
This commit is contained in:
parent
e38045ccad
commit
104e48b6cb
5 changed files with 43 additions and 15 deletions
|
@ -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>
|
||||
)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue