Grid List
/**
* Ecommerce Dashboard
*/
import React, { Component } from 'react'
...
// GridList data
const tileData = [
{
img: require('Assets/img/gallery-1.jpg'),
title: 'Gallery 1',
author: 'author',
cols: 1.3,
},
{
img: require('Assets/img/gallery-2.jpg'),
title: 'Gallery 2',
author: 'author',
cols: .7,
},
{
img: require('Assets/img/gallery-3.jpg'),
title: 'Gallery 3',
author: 'author',
cols: .66,
},
{
img: require('Assets/img/gallery-4.jpg'),
title: 'Gallery 4',
author: 'author',
cols: .66,
}
]
export default class EcommerceDashboard extends Component {
...
return (
...
// Grid List Code
<div>
<GridList>
{tileData.map(tile => (
<GridListTile key={tile.img} cols={tile.cols || 1}>
<img src={tile.img} alt={tile.title} />
</GridListTile>
))}
</GridList>
</div>
</div>
</div> 



Last updated