fix: docked sidebar width (#9213)

This commit is contained in:
David Luzar 2025-03-02 18:24:20 +01:00 committed by GitHub
parent 2523624f15
commit d1112bbf4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 4 deletions

View file

@ -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}

View file

@ -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))` }
: {}
}
>

View file

@ -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}>