UNPKG

materialuiupgraded

Version:

Material-UI's workspace package

50 lines (45 loc) 1.59 kB
import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import Icon from '@material-ui/core/Icon'; import IconButton from '@material-ui/core/IconButton'; import DeleteIcon from '@material-ui/icons/Delete'; import AddShoppingCartIcon from '@material-ui/icons/AddShoppingCart'; import PhotoCamera from '@material-ui/icons/PhotoCamera'; const styles = theme => ({ button: { margin: theme.spacing.unit, }, input: { display: 'none', }, }); function IconButtons(props) { const { classes } = props; return ( <div> <IconButton className={classes.button} aria-label="Delete"> <DeleteIcon /> </IconButton> <IconButton className={classes.button} aria-label="Delete" disabled color="primary"> <DeleteIcon /> </IconButton> <IconButton color="secondary" className={classes.button} aria-label="Add an alarm"> <Icon>alarm</Icon> </IconButton> <IconButton color="primary" className={classes.button} aria-label="Add to shopping cart"> <AddShoppingCartIcon /> </IconButton> <input accept="image/*" className={classes.input} id="icon-button-file" type="file" /> <label htmlFor="icon-button-file"> <IconButton color="primary" className={classes.button} component="span"> <PhotoCamera /> </IconButton> </label> </div> ); } IconButtons.propTypes = { classes: PropTypes.object.isRequired, }; export default withStyles(styles)(IconButtons);