Ejemplo n.º 1
0
 {popupState => (
   <React.Fragment>
     <Button variant="contained" {...bindTrigger(popupState)}>
       Open Menu
     </Button>
     <Menu {...bindMenu(popupState)}>
       <MenuItem onClick={popupState.close}>Cake</MenuItem>
       <MenuItem onClick={popupState.close}>Death</MenuItem>
     </Menu>
   </React.Fragment>
 )}
Ejemplo n.º 2
0
 {popupState => (
   <div>
     <Button variant="contained" {...bindTrigger(popupState)}>
       Open Popover
     </Button>
     <Popover
       {...bindPopover(popupState)}
       anchorOrigin={{
         vertical: 'bottom',
         horizontal: 'center',
       }}
       transformOrigin={{
         vertical: 'top',
         horizontal: 'center',
       }}
     >
       <Typography className={classes.typography}>The content of the Popover.</Typography>
     </Popover>
   </div>
 )}