diff --git a/docs/src/app/components/pages/components/GridList/ExampleComplex.js b/docs/src/app/components/pages/components/GridList/ExampleComplex.js
index ae36986901e830..858b9f4e68efaf 100644
--- a/docs/src/app/components/pages/components/GridList/ExampleComplex.js
+++ b/docs/src/app/components/pages/components/GridList/ExampleComplex.js
@@ -11,7 +11,7 @@ const styles = {
},
gridList: {
width: 500,
- height: 400,
+ height: 450,
overflowY: 'auto',
marginBottom: 24,
},
diff --git a/docs/src/app/components/pages/components/GridList/ExampleSimple.js b/docs/src/app/components/pages/components/GridList/ExampleSimple.js
index 2c5a9f0f3d96c9..67573ef89756ce 100644
--- a/docs/src/app/components/pages/components/GridList/ExampleSimple.js
+++ b/docs/src/app/components/pages/components/GridList/ExampleSimple.js
@@ -12,7 +12,7 @@ const styles = {
},
gridList: {
width: 500,
- height: 400,
+ height: 500,
overflowY: 'auto',
marginBottom: 24,
},
@@ -61,7 +61,6 @@ const tilesData = [
},
];
-
const GridListExampleSimple = () => (
+
{title}
- {
- subtitle ? (
{subtitle}
) : null
- }
+ {subtitle ? (
{subtitle}
) : null}
- {
- actionIcon ? (
{actionIcon}
) : null
- }
+ {actionIcon ? (
{actionIcon}
) : null}
);
}
let newChildren = children;
- // if there is an image passed as children
- // clone it an put our styles
+ // if there is a single image passed as children
+ // clone it and add our styles
if (React.Children.count(children) === 1) {
newChildren = React.Children.map(children, (child) => {
if (child.type === 'img') {
return React.cloneElement(child, {
+ key: 'img',
ref: 'img',
style: prepareStyles(Object.assign({}, styles.childImg, child.props.style)),
});
@@ -254,13 +251,14 @@ const GridTile = React.createClass({
});
}
- const RootTag = rootClass;
- return (
-
- {newChildren}
- {titleBar}
-
- );
+ const containerProps = {
+ style: prepareStyles(mergedRootStyles),
+ ...other,
+ };
+
+ return React.isValidElement(containerElement) ?
+ React.cloneElement(containerElement, containerProps, [newChildren, titleBar]) :
+ React.createElement(containerElement, containerProps, [newChildren, titleBar]);
},
});