mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix: width blink in side bar (#5291)
This commit is contained in:
@@ -149,12 +149,13 @@ export const ResizePanel = forwardRef<HTMLDivElement, ResizePanelProps>(
|
||||
ref
|
||||
) {
|
||||
const enableAnimation = useEnableAnimation() && _enableAnimation;
|
||||
const safeWidth = Math.min(maxWidth, Math.max(minWidth, width));
|
||||
return (
|
||||
<div
|
||||
{...rest}
|
||||
ref={ref}
|
||||
style={assignInlineVars({
|
||||
[styles.panelWidthVar]: `${width}px`,
|
||||
[styles.panelWidthVar]: `${safeWidth}px`,
|
||||
})}
|
||||
className={clsx(className, styles.root)}
|
||||
data-open={open}
|
||||
|
||||
Reference in New Issue
Block a user