forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mui#1988 from igorbt/gridlist-docs-fix
[GridList] docs fix - add back code examples
- Loading branch information
Showing
2 changed files
with
73 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{/* Basic grid list with mostly default options */} | ||
<GridList | ||
cellHeight={200} | ||
style={{width: 320, height: 640, overflowY: 'auto'}} | ||
> | ||
{ | ||
tilesData.map(tile => <GridTile | ||
title={tile.title} | ||
subtitle={<span>by <b>{tile.author}</b></span>} | ||
actionIcon={<IconButton><StarBorder color="white"/></IconButton>} | ||
><img src={tile.img} /></GridTile>) | ||
} | ||
</GridList> | ||
{/* Grid list with all possible overrides */} | ||
<GridList | ||
cols={2} | ||
cellHeight={200} | ||
padding={1} | ||
style={{width: 320, height: 640, overflowY: 'auto'}} | ||
> | ||
{ | ||
tilesData.map(tile => <GridTile | ||
title={tile.title} | ||
actionIcon={<IconButton><StarBorder color="white"/></IconButton>} | ||
actionPosition="left" | ||
titlePosition="top" | ||
titleBackground={gradientBg} | ||
cols={tile.featured ? 2 : 1} | ||
rows={tile.featured ? 2 : 1} | ||
><img src={tile.img} /></GridTile>) | ||
} | ||
</GridList> |