{"id":285,"date":"2019-10-04T05:49:01","date_gmt":"2019-10-04T05:49:01","guid":{"rendered":"https:\/\/docs.theironnetwork.org\/reactify\/?page_id=285"},"modified":"2019-10-10T08:21:16","modified_gmt":"2019-10-10T08:21:16","slug":"grid-list","status":"publish","type":"page","link":"https:\/\/docs.theironnetwork.org\/reactify\/grid-list\/","title":{"rendered":"Grid List"},"content":{"rendered":"\n<p>You can add the component on any page in the template. You need to follow the steps given below: \u200c<\/p>\n\n\n\n<p><strong>Step 1:<\/strong> You need to create an array that contains the data for the grid list. Also you need to add the code of grid list in the page where you want to add the component. Please check the code snippet given below, we have added the grid list in the Ecommerce Dashboard:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/**<br> * Ecommerce Dashboard<br>*\/<br>import React, { Component } from 'react'<br>...<br>\/\/ GridList data<br>const tileData = [<br>   {<br>      img: require('Assets\/img\/gallery-1.jpg'),<br>      title: 'Gallery 1',<br>      author: 'author',<br>      cols: 1.3,<br>   },<br>   ...<br>   {<br>      img: require('Assets\/img\/gallery-4.jpg'),<br>      title: 'Gallery 4',<br>      author: 'author',<br>      cols: .66,<br>   }<br> ]<br><br>export default class EcommerceDashboard extends Component {<br>    ...<br>    return (<br>         ...<br>         \/\/ Grid List Code<br>         &lt;div&gt;<br>            &lt;GridList&gt;<br>               {tileData.map(tile =&gt; (<br>                 &lt;GridListTile key={tile.img} cols={tile.cols || 1}&gt;<br>                    &lt;img src={tile.img} alt={tile.title} \/&gt;<br>                 &lt;\/GridListTile&gt;<br>               ))}<br>            &lt;\/GridList&gt;<br>          &lt;\/div&gt;<br>        &lt;\/div&gt;<br>      &lt;\/div&gt; <\/pre>\n\n\n\n<p><strong>Step 2:<\/strong> Now Import the component from its parent library.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import GridList from '@material-ui\/core\/GridList';<br>import GridListTile from '@material-ui\/core\/GridListTile';<\/pre>\n\n\n\n<p>We have given you an example of adding an image only grid list on the Ecommerce Dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1024\" height=\"422\" src=\"https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list-1024x422.png\" alt=\"\" class=\"wp-image-514\" srcset=\"https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list-1024x422.png 1024w, https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list-300x124.png 300w, https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list-768x317.png 768w, https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list.png 1304w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>You can check some other layouts of grid list below. For adding any of the below layout in the template, please check their relative code in the <code>src->routes->components->grid-list->components<\/code> folder.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1024\" height=\"351\" src=\"https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list3-1024x351.png\" alt=\"\" class=\"wp-image-515\" srcset=\"https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list3-1024x351.png 1024w, https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list3-300x103.png 300w, https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list3-768x263.png 768w, https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list3-1568x537.png 1568w, https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list3.png 1615w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1024\" height=\"350\" src=\"https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list2-1024x350.png\" alt=\"\" class=\"wp-image-517\" srcset=\"https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list2-1024x350.png 1024w, https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list2-300x102.png 300w, https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list2-768x262.png 768w, https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list2-1568x535.png 1568w, https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list2.png 1614w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1024\" height=\"191\" src=\"https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list4-1024x191.png\" alt=\"\" class=\"wp-image-516\" srcset=\"https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list4-1024x191.png 1024w, https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list4-300x56.png 300w, https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list4-768x143.png 768w, https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list4-1568x292.png 1568w, https:\/\/docs.theironnetwork.org\/reactify\/wp-content\/uploads\/sites\/4\/2019\/10\/grid-list4.png 1611w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<div class=\"pld-like-dislike-wrap pld-template-1\">\n    <div class=\"pld-like-wrap  pld-common-wrap\">\n    <a href=\"javascript:void(0);\" class=\"pld-like-trigger pld-like-dislike-trigger \" title=\"\" data-post-id=\"285\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-ip-check=\"0\" data-user-check=\"1\">\n                        <i class=\"fas fa-thumbs-up\"><\/i>\n                    <\/a>\n    <span class=\"pld-like-count-wrap pld-count-wrap\">1    <\/span>\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\n    <a href=\"javascript:void(0);\" class=\"pld-dislike-trigger pld-like-dislike-trigger \" title=\"\" data-post-id=\"285\" data-trigger-type=\"dislike\" data-ip-check=\"0\" data-restriction=\"cookie\" data-user-check=\"1\">\n                        <i class=\"fas fa-thumbs-down\"><\/i>\n                    <\/a>\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\n<\/div><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>You can add the component on any page in the template. You need to follow the steps given below: \u200c Step 1: You need to create an array that contains the data for the grid list. Also you need to add the code of grid list in the page where you want to add the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":27,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/pages\/285"}],"collection":[{"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/comments?post=285"}],"version-history":[{"count":3,"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/pages\/285\/revisions"}],"predecessor-version":[{"id":518,"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/pages\/285\/revisions\/518"}],"wp:attachment":[{"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/media?parent=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}