diff --git a/docs/src/app/components/pages/components/grid-list.jsx b/docs/src/app/components/pages/components/grid-list.jsx
index 4c42eb526a753a..edd1029abc0421 100644
--- a/docs/src/app/components/pages/components/grid-list.jsx
+++ b/docs/src/app/components/pages/components/grid-list.jsx
@@ -5,48 +5,14 @@ let StarBorder = require('svg-icons/toggle/star-border');
let IconButton = require('icon-button');
let ComponentDoc = require('../../component-doc');
-
+let Code = require('grid-list-code');
+let CodeExample = require('../../code-example/code-example');
class GridListPage extends React.Component {
constructor(props) {
super(props);
- this.code = `
-{/* Basic grid list with mostly default options */}
-
- {
- tilesData.map(tile => by {tile.author}}
- actionIcon={}
- >)
- }
-
-{/* Grid list with all possible overrides */}
-
- {
- tilesData.map(tile => }
- actionPosition="left"
- titlePosition="top"
- titleBackground={gradientBg}
- cols={tile.featured ? 2 : 1}
- rows={tile.featured ? 2 : 1}
- >)
- }
-
- `;
-
this.desc =
Simple flex-box based Grid List implementation. Support tiles with arbitrary cell size,
@@ -207,40 +173,42 @@ class GridListPage extends React.Component {
code={this.code}
desc={this.desc}
componentInfo={this.componentInfo}>
-
- {/* Basic grid list with mostly default options */}
-
- {
- tilesData.map(tile => by {tile.author}}
- actionIcon={}
- >)
- }
-
- {/* Grid list with all possible overrides */}
-
- {
- tilesData.map(tile => }
- actionPosition="left"
- titlePosition="top"
- titleBackground={gradientBg}
- cols={tile.featured ? 2 : 1}
- rows={tile.featured ? 2 : 1}
- >)
- }
-
-
+
+
+ {/* Basic grid list with mostly default options */}
+
+ {
+ tilesData.map(tile => by {tile.author}}
+ actionIcon={}
+ >)
+ }
+
+ {/* Grid list with all possible overrides */}
+
+ {
+ tilesData.map(tile => }
+ actionPosition="left"
+ titlePosition="top"
+ titleBackground={gradientBg}
+ cols={tile.featured ? 2 : 1}
+ rows={tile.featured ? 2 : 1}
+ >)
+ }
+
+
+
);
}
diff --git a/docs/src/app/components/raw-code/grid-list-code.txt b/docs/src/app/components/raw-code/grid-list-code.txt
new file mode 100644
index 00000000000000..0fa7b71d181d1f
--- /dev/null
+++ b/docs/src/app/components/raw-code/grid-list-code.txt
@@ -0,0 +1,32 @@
+{/* Basic grid list with mostly default options */}
+
+ {
+ tilesData.map(tile => by {tile.author}}
+ actionIcon={}
+ >)
+ }
+
+{/* Grid list with all possible overrides */}
+
+ {
+ tilesData.map(tile => }
+ actionPosition="left"
+ titlePosition="top"
+ titleBackground={gradientBg}
+ cols={tile.featured ? 2 : 1}
+ rows={tile.featured ? 2 : 1}
+ >)
+ }
+