Skip to content

Commit 63fc409

Browse files
committed
fix(Panel): style property passing
1 parent 332aaae commit 63fc409

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/tidy-steaks-occur.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": patch
3+
---
4+
5+
Fix issue in Panel component when style property could be applied to both outer and inner containers.

src/components/layout/Panel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ function Panel(props: CubePanelProps, ref: ForwardedRef<HTMLDivElement>) {
135135
...COLOR_STYLES,
136136
...DIMENSION_STYLES,
137137
].forEach((style) => {
138-
if (style in props) {
139-
styles = { ...styles, [style]: props[style] };
138+
if (style in otherProps) {
139+
styles = { ...styles, [style]: otherProps[style] };
140140

141141
delete otherProps[style];
142142
}

0 commit comments

Comments
 (0)