Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/witty-ladybugs-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@cube-dev/ui-kit': patch
---

Fix props propagation in ResizablePanel.
7 changes: 4 additions & 3 deletions src/components/layout/ResizablePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const Handler = (props: HandlerProps) => {
);
};

const PanelElement = tasty(Panel, {
const StyledPanel = tasty(Panel, {
styles: {
flexGrow: 0,
width: {
Expand Down Expand Up @@ -220,6 +220,7 @@ function ResizablePanel(
onSizeChange,
minSize = 200,
maxSize = isControllable ? undefined : 'min(50%, 400px)',
...restProps
} = props;

const [isDragging, setIsDragging] = useState(false);
Expand Down Expand Up @@ -330,7 +331,7 @@ function ResizablePanel(
}, [isDragging, isHorizontal, isDisabled]);

return (
<PanelElement
<StyledPanel
ref={ref}
data-direction={direction}
mods={mods}
Expand All @@ -342,7 +343,7 @@ function ResizablePanel(
mods={mods}
/>
}
{...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`,
Expand Down
Loading