feat: make device breakpoints more specific (#7243)

This commit is contained in:
David Luzar 2023-11-06 16:29:00 +01:00 committed by GitHub
parent 18a7b97515
commit b1037b342d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 164 additions and 121 deletions

View file

@ -19,6 +19,10 @@ Please add the latest change on the top under the correct section.
- Regenerate ids by default when using transform api and also update bindings by 0.5px to avoid possible overlapping [#7195](https://github.com/excalidraw/excalidraw/pull/7195)
- Add `selected` prop for `MainMenu.Item` and `MainMenu.ItemCustom` components to indicate active state. [#7078](https://github.com/excalidraw/excalidraw/pull/7078)
#### BREAKING CHANGES
- [`useDevice`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/utils#usedevice) hook's return value was changed to differentiate between `editor` and `viewport` breakpoints. [#7243](https://github.com/excalidraw/excalidraw/pull/7243)
## 0.16.1 (2023-09-21)
## Excalidraw Library

View file

@ -8,7 +8,7 @@ const MobileFooter = ({
excalidrawAPI: ExcalidrawImperativeAPI;
}) => {
const device = useDevice();
if (device.isMobile) {
if (device.editor.isMobile) {
return (
<Footer>
<CustomFooter excalidrawAPI={excalidrawAPI} />