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

Grid component has extra 8px with the width? #7683

Closed
wulingmei opened this issue Aug 7, 2017 · 2 comments
Closed

Grid component has extra 8px with the width? #7683

wulingmei opened this issue Aug 7, 2017 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@wulingmei
Copy link

import React from 'react';
import PropTypes from 'prop-types';
import { withStyles, createStyleSheet } from 'material-ui/styles';
import AppBar from 'material-ui/AppBar';
import Toolbar from 'material-ui/Toolbar';
import Typography from 'material-ui/Typography';
import Button from 'material-ui/Button';
import IconButton from 'material-ui/IconButton';
import MenuIcon from 'material-ui-icons/Menu';
import Paper from 'material-ui/Paper';
import Grid from 'material-ui/Grid';

const styleSheet = createStyleSheet(theme => ({
  root: {
      width:'100%',
    flexGrow: 1,
  },
  container:{
      marginTop:'30px',
  },
  flex: {
    flex: 1,
  },
}));

function Main(props) {
  const classes = props.classes;
  return (
      <div className={classes.root}>
        <AppBar position="static" color="accent">
                <Toolbar>
                    <IconButton color="contrast" aria-label="Menu">
                        <MenuIcon />
                    </IconButton>
                    <Typography type="title" color="inherit" className={classes.flex}>
                        美美,我爱你
                    </Typography>
                    <Button color="contrast">登录</Button>
                </Toolbar>
        </AppBar>
        <Grid container >
                <Grid item xs>
                    sdf
                </Grid>
        </Grid>
      </div>
  );
}

Main.propTypes = {
  classes: PropTypes.object.isRequired,
};

export default withStyles(styleSheet)(Main);

image

@oliviertassinari oliviertassinari added the duplicate This issue or pull request already exists label Aug 7, 2017
@oliviertassinari
Copy link
Member

It's a duplicate of #7466.

@wulingmei
Copy link
Author

<Grid container spacing={0}>
                <Grid item xs>
                    <ImageGridList/>
                </Grid>
            </Grid>

that is OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants