diff --git a/.changeset/witty-ladybugs-mate.md b/.changeset/witty-ladybugs-mate.md new file mode 100644 index 000000000..ba80f3eda --- /dev/null +++ b/.changeset/witty-ladybugs-mate.md @@ -0,0 +1,5 @@ +--- +'@cube-dev/ui-kit': patch +--- + +Fix props propagation in ResizablePanel. diff --git a/src/components/layout/ResizablePanel.tsx b/src/components/layout/ResizablePanel.tsx index b7332da2b..63dd5427d 100644 --- a/src/components/layout/ResizablePanel.tsx +++ b/src/components/layout/ResizablePanel.tsx @@ -187,7 +187,7 @@ const Handler = (props: HandlerProps) => { ); }; -const PanelElement = tasty(Panel, { +const StyledPanel = tasty(Panel, { styles: { flexGrow: 0, width: { @@ -220,6 +220,7 @@ function ResizablePanel( onSizeChange, minSize = 200, maxSize = isControllable ? undefined : 'min(50%, 400px)', + ...restProps } = props; const [isDragging, setIsDragging] = useState(false); @@ -330,7 +331,7 @@ function ResizablePanel( }, [isDragging, isHorizontal, isDisabled]); return ( - } - {...mergeProps(props, { + {...mergeProps(restProps, { style: { // We set a current size further via width/min-width/max-width styles to respect size boundaries '--size': `${size}px`,