From b1037b342dfe52ef73b559b8a835804aab8b7b79 Mon Sep 17 00:00:00 2001 From: David Luzar <5153846+dwelle@users.noreply.github.com> Date: Mon, 6 Nov 2023 16:29:00 +0100 Subject: [PATCH] feat: make device breakpoints more specific (#7243) --- .../api/children-components/footer.mdx | 2 +- .../excalidraw/api/utils/utils-intro.md | 3 +- excalidraw-app/tests/MobileMenu.test.tsx | 18 ++- src/actions/actionExport.tsx | 2 +- src/actions/actionProperties.tsx | 2 +- src/actions/manager.tsx | 2 +- src/components/Actions.tsx | 4 +- src/components/App.tsx | 147 ++++++++++-------- src/components/ColorPicker/ColorInput.tsx | 2 +- src/components/ColorPicker/ColorPicker.tsx | 14 +- src/components/Dialog.tsx | 2 +- src/components/HintViewer.tsx | 2 +- src/components/LayerUI.tsx | 16 +- src/components/LibraryUnit.tsx | 2 +- src/components/Sidebar/Sidebar.tsx | 8 +- src/components/Sidebar/SidebarHeader.tsx | 2 +- .../dropdownMenu/DropdownMenuContent.tsx | 4 +- .../dropdownMenu/DropdownMenuItemContent.tsx | 2 +- .../dropdownMenu/DropdownMenuTrigger.tsx | 2 +- src/components/main-menu/MainMenu.tsx | 4 +- .../welcome-screen/WelcomeScreen.Center.tsx | 2 +- src/constants.ts | 2 - src/element/textWysiwyg.test.tsx | 6 +- src/hooks/useCreatePortalContainer.ts | 9 +- src/packages/excalidraw/CHANGELOG.md | 4 + .../excalidraw/example/MobileFooter.tsx | 2 +- src/tests/test-utils.ts | 8 +- src/types.ts | 12 +- 28 files changed, 164 insertions(+), 121 deletions(-) diff --git a/dev-docs/docs/@excalidraw/excalidraw/api/children-components/footer.mdx b/dev-docs/docs/@excalidraw/excalidraw/api/children-components/footer.mdx index cdd5ea5a..3831268f 100644 --- a/dev-docs/docs/@excalidraw/excalidraw/api/children-components/footer.mdx +++ b/dev-docs/docs/@excalidraw/excalidraw/api/children-components/footer.mdx @@ -34,7 +34,7 @@ Open the `Menu` in the below playground and you will see the `custom footer` ren ```jsx live noInline const MobileFooter = ({}) => { const device = useDevice(); - if (device.isMobile) { + if (device.editor.isMobile) { return (