mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: Custom actions and shortcuts
This commit is contained in:
parent
0f11f7da15
commit
8e5d376b49
14 changed files with 452 additions and 98 deletions
|
@ -42,6 +42,7 @@ type MobileMenuProps = {
|
|||
device: Device;
|
||||
renderWelcomeScreen?: boolean;
|
||||
renderMenu: () => React.ReactNode;
|
||||
onContextMenu?: (event: React.MouseEvent, source: string) => void;
|
||||
};
|
||||
|
||||
export const MobileMenu = ({
|
||||
|
@ -60,6 +61,7 @@ export const MobileMenu = ({
|
|||
device,
|
||||
renderWelcomeScreen,
|
||||
renderMenu,
|
||||
onContextMenu,
|
||||
}: MobileMenuProps) => {
|
||||
const renderToolbar = () => {
|
||||
return (
|
||||
|
@ -98,6 +100,7 @@ export const MobileMenu = ({
|
|||
insertOnCanvasDirectly: pointerType !== "mouse",
|
||||
});
|
||||
}}
|
||||
onContextMenu={onContextMenu}
|
||||
/>
|
||||
</Stack.Row>
|
||||
</Island>
|
||||
|
@ -190,6 +193,7 @@ export const MobileMenu = ({
|
|||
appState={appState}
|
||||
elements={elements}
|
||||
renderAction={actionManager.renderAction}
|
||||
getCustomActions={actionManager.getCustomActions}
|
||||
/>
|
||||
</Section>
|
||||
) : null}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue