joywok-material-components
Version:
<h1 align="center"> Joywok Material Components </h1>
38 lines (36 loc) • 906 B
JavaScript
import React from 'react';
import ReactDOM from 'react-dom';
import { withStyles } from '@material-ui/core/styles';
import Chip from '@material-ui/core/Chip';
import FaceIcon from '@material-ui/icons/Face';
const styles = theme => ({
root: {
display: 'flex',
justifyContent: 'center',
flexWrap: 'wrap',
},
chip: {
margin: theme.spacing.unit,
},
});
class JwChips extends React.Component{
constructor(props) {
super(props);
this.state = {};
}
handleDelete(){}
render(){
return (
<div className={"jw-chips "+(this.props.className && this.props.className.length!=0?this.props.className:'')}>
<Chip
icon={<FaceIcon />}
label="Deletable Secondary Chip"
onDelete={this.handleDelete}
className={this.props.classes.chip}
color="secondary"
/>
</div>
)
}
}
export default withStyles(styles)(JwChips);