Fix Container not rendering children
Children was in propDefs (extracted to ownProps by useDefinition) but the component only spread restProps on a self-closing div, silently dropping children. Now explicitly renders children from ownProps. Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
@@ -26,7 +26,7 @@ export const Container = forwardRef<HTMLDivElement, ContainerProps>(
|
||||
ContainerDefinition,
|
||||
props,
|
||||
);
|
||||
const { classes, style } = ownProps;
|
||||
const { classes, children, style } = ownProps;
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -34,7 +34,9 @@ export const Container = forwardRef<HTMLDivElement, ContainerProps>(
|
||||
className={classes.root}
|
||||
style={{ ...utilityStyle, ...style }}
|
||||
{...restProps}
|
||||
/>
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user