diff --git a/packages/orbit-components/src/Layout/index.tsx b/packages/orbit-components/src/Layout/index.tsx index bd8cf156c2..2ba8d04bad 100644 --- a/packages/orbit-components/src/Layout/index.tsx +++ b/packages/orbit-components/src/Layout/index.tsx @@ -15,20 +15,25 @@ const getChildrenProps = (type: Type, key: string) => { return null; }; -const Layout = ({ children, type, dataTest }: Props) => ( - - {React.Children.map(children as React.ReactElement, (item, key) => { - return React.cloneElement(item, { - ...getChildrenProps(type, key.toString()), - ...item.props, - }); - })} - -); +const Layout = ({ children, type, dataTest }: Props) => { + // Removes unwanted props from Grid + const { layoutColumns: _, ...props } = LAYOUT_SETTINGS[type]; + + return ( + + {React.Children.map(children as React.ReactElement, (item, key) => { + return React.cloneElement(item, { + ...getChildrenProps(type, key.toString()), + ...item.props, + }); + })} + + ); +}; export default Layout;