Skip to content
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

Merged
merged 1 commit into from
Dec 29, 2015

Conversation

Zadielerick
Copy link
Contributor

No description provided.

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';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing lib/

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation PR: Needs Review labels Dec 28, 2015
style={{width: 500, height: 400, overflowY: 'auto', marginBottom: 24}}
>
{
tilesData.map(tile => <GridTile
Copy link
Member

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>
// ....

Copy link
Contributor Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any time 😁

@Zadielerick Zadielerick changed the title Updated Docs for Grid List [Docs] Updated Docs for Grid List Dec 29, 2015
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';
Copy link
Member

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/...

@oliviertassinari
Copy link
Member

@Zadielerick It looks good.
Can you squash down the commit? I think that we can merge then 👍.

@alitaheri
Copy link
Member

@Zadielerick Thanks a bunch 👍 👍 Awesome work 🎉 🎈

alitaheri added a commit that referenced this pull request Dec 29, 2015
@alitaheri alitaheri merged commit e3dee6f into mui:master Dec 29, 2015
@Zadielerick
Copy link
Contributor Author

Thanks!

@Zadielerick Zadielerick deleted the gridListDocsUpdate branch December 29, 2015 21:00
@oliviertassinari
Copy link
Member

@Zadielerick Yeah 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants