@material-ui/core#ExpansionPanelActions JavaScript Examples

The following examples show how to use @material-ui/core#ExpansionPanelActions. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AddPostRightPanels.jsx    From oftadeh-react-admin with MIT License 4 votes vote down vote up
export default function AddPostRightPanels() {
  const [expanded, setExpanded] = React.useState(true);

  const classes = useStyles();

  const handleExpandedChange = () => {
    setExpanded(!expanded);
  };

  return (
    <div className={classes.root}>
      <ExpansionPanel expanded={expanded} className={classes.mb3}>
        <ExpansionPanelSummary
          onClick={handleExpandedChange}
          expandIcon={<ExpandMoreIcon />}
          aria-controls="panel1a-content"
          id="panel1a-header"
        >
          <Typography className={classes.heading}>Publish</Typography>
        </ExpansionPanelSummary>
        <Divider />
        <ExpansionPanelDetails>
          <Grid container>
            <Grid
              item
              container
              justify="space-between"
              className={classes.my1}
            >
              <Button variant="contained" color="default" size="small">
                Save Draft
              </Button>
              <Button variant="contained" color="default" size="small">
                Preview
              </Button>
            </Grid>
            <Grid item>
              <List dense>
                <ListItem>
                  <ListItemIcon>
                    <OfflinePinIcon />
                  </ListItemIcon>
                  <ListItemText primary="status" />
                </ListItem>
                <ListItem>
                  <ListItemIcon>
                    <VisibilityIcon />
                  </ListItemIcon>
                  <ListItemText primary="visibility" />
                </ListItem>
                <ListItem>
                  <ListItemIcon>
                    <DateRangeIcon />
                  </ListItemIcon>
                  <ListItemText primary="Publish" />
                </ListItem>
              </List>
            </Grid>
          </Grid>
        </ExpansionPanelDetails>
        <Divider />
        <ExpansionPanelActions>
          <Grid container justify="space-between">
            <Button color="secondary" size="small">
              Move To Trash
            </Button>
            <Button variant="contained" color="primary" size="small">
              Publish
            </Button>
          </Grid>
        </ExpansionPanelActions>
      </ExpansionPanel>
      <ExpansionPanel className={classes.mb3}>
        <ExpansionPanelSummary
          expandIcon={<ExpandMoreIcon />}
          aria-controls="panel2a-content"
          id="panel2a-header"
        >
          <Typography className={classes.heading}>Categories</Typography>
        </ExpansionPanelSummary>
        <ExpansionPanelDetails>
          <AddPostRightPanelsAutoComplete />
        </ExpansionPanelDetails>
      </ExpansionPanel>
      <ExpansionPanel className={classes.mb3}>
        <ExpansionPanelSummary
          expandIcon={<ExpandMoreIcon />}
          aria-controls="panel3a-content"
          id="panel3a-header"
        >
          <Typography className={classes.heading}>Tags</Typography>
        </ExpansionPanelSummary>
        <ExpansionPanelDetails>
          <AddPostRightPanelsAutoComplete />
        </ExpansionPanelDetails>
      </ExpansionPanel>
    </div>
  );
}