Update MobileMenu.tsx

This commit is contained in:
zsviczian 2022-03-11 13:34:42 +01:00 committed by GitHub
parent cec3cf8334
commit 73f0d854bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,10 +1,9 @@
import clsx from "clsx";
import React from "react"; import React from "react";
import { AppState } from "../types"; import { AppState } from "../types";
import { ActionManager } from "../actions/manager"; import { ActionManager } from "../actions/manager";
import { t } from "../i18n"; import { t } from "../i18n";
import Stack from "./Stack"; import Stack from "./Stack";
import { isTextElement, showSelectedShapeActions } from "../element"; import { showSelectedShapeActions } from "../element";
import { NonDeletedExcalidrawElement } from "../element/types"; import { NonDeletedExcalidrawElement } from "../element/types";
import { FixedSideContainer } from "./FixedSideContainer"; import { FixedSideContainer } from "./FixedSideContainer";
import { Island } from "./Island"; import { Island } from "./Island";
@ -171,15 +170,6 @@ export const MobileMenu = ({
return ( return (
<> <>
{!viewModeEnabled && renderToolbar()} {!viewModeEnabled && renderToolbar()}
<div
className={clsx("layer-ui__wrapper", {
"disable-pointerEvents":
appState.draggingElement ||
appState.resizingElement ||
(appState.editingElement &&
!isTextElement(appState.editingElement)),
})}
>
<div <div
className="App-bottom-bar" className="App-bottom-bar"
style={{ style={{
@ -206,12 +196,9 @@ export const MobileMenu = ({
) )
.map(([clientId, client]) => ( .map(([clientId, client]) => (
<React.Fragment key={clientId}> <React.Fragment key={clientId}>
{actionManager.renderAction( {actionManager.renderAction("goToCollaborator", {
"goToCollaborator",
{
id: clientId, id: clientId,
}, })}
)}
</React.Fragment> </React.Fragment>
))} ))}
</UserList> </UserList>
@ -223,10 +210,7 @@ export const MobileMenu = ({
) : appState.openMenu === "shape" && ) : appState.openMenu === "shape" &&
!viewModeEnabled && !viewModeEnabled &&
showSelectedShapeActions(appState, elements) ? ( showSelectedShapeActions(appState, elements) ? (
<Section <Section className="App-mobile-menu" heading="selectedShapeActions">
className="App-mobile-menu"
heading="selectedShapeActions"
>
<SelectedShapeActions <SelectedShapeActions
appState={appState} appState={appState}
elements={elements} elements={elements}
@ -252,7 +236,6 @@ export const MobileMenu = ({
</footer> </footer>
</Island> </Island>
</div> </div>
</div>
</> </>
); );
}; };