-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Docs] Updated Docs for Grid List #2681
Conversation
f9e3265
to
ff4ba9b
Compare
import React from 'react'; | ||
import GridList from 'material-ui/lib/grid-list/grid-list'; | ||
import GridTile from 'material-ui/lib/grid-list/grid-tile'; | ||
import StarBorder from 'material-ui/svg-icons/toggle/star-border'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing lib/
style={{width: 500, height: 400, overflowY: 'auto', marginBottom: 24}} | ||
> | ||
{ | ||
tilesData.map(tile => <GridTile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took me a while to get to bottom of this -_-
This little guy breaks code highlighting. Take it out into a variable and all works well:
const titleElements = tilesData.map(tile => <GridTile
key={tile.img}
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
cols={2}
cellHeight={200}
padding={1}
style={{width: 500, height: 400, overflowY: 'auto', marginBottom: 24}}
>
{titleElements}
</GridList>
// ....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alitaheri Thank you! I couldn't figure out why it wasn't highlighting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any time 😁
import GridList from 'material-ui/lib/grid-list/grid-list'; | ||
import GridTile from 'material-ui/lib/grid-list/grid-tile'; | ||
import StarBorder from 'material-ui/lib/svg-icons/toggle/star-border'; | ||
import IconButton from 'icon-button'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That won't work when people will copy past the example.
Use the material-ui/lib/...
@Zadielerick It looks good. |
d98109c
to
287659a
Compare
287659a
to
b280f5b
Compare
@Zadielerick Thanks a bunch 👍 👍 Awesome work 🎉 🎈 |
[Docs] Updated Docs for Grid List
Thanks! |
@Zadielerick Yeah 🎉 |
No description provided.