Browse Source

fix: docked sidebar width (#9213)

pull/9210/head
David Luzar 10 months ago committed by GitHub
parent
commit
d1112bbf4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      packages/excalidraw/components/App.tsx
  2. 2
      packages/excalidraw/components/LayerUI.tsx
  3. 3
      packages/excalidraw/components/Sidebar/Sidebar.tsx

1
packages/excalidraw/components/App.tsx

@ -1550,6 +1550,7 @@ class App extends React.Component<AppProps, AppState> { @@ -1550,6 +1550,7 @@ class App extends React.Component<AppProps, AppState> {
["--ui-pointerEvents" as any]: shouldBlockPointerEvents
? POINTER_EVENTS.disabled
: POINTER_EVENTS.enabled,
["--right-sidebar-width" as any]: "302px",
}}
ref={this.excalidrawContainerRef}
onDrop={this.handleAppOnDrop}

2
packages/excalidraw/components/LayerUI.tsx

@ -526,7 +526,7 @@ const LayerUI = ({ @@ -526,7 +526,7 @@ const LayerUI = ({
appState.openSidebar &&
isSidebarDocked &&
device.editor.canFitSidebar
? { width: `calc(100% - var(--right-sidebar-width)px)` }
? { width: `calc(100% - var(--right-sidebar-width))` }
: {}
}
>

3
packages/excalidraw/components/Sidebar/Sidebar.tsx

@ -136,9 +136,6 @@ export const SidebarInner = forwardRef( @@ -136,9 +136,6 @@ export const SidebarInner = forwardRef(
<Island
{...rest}
className={clsx("sidebar", { "sidebar--docked": docked }, className)}
style={{
"--right-sidebar-width": "302px",
}}
ref={islandRef}
>
<SidebarPropsContext.Provider value={headerPropsRef.current}>

Loading…
Cancel
Save