Refactor project structure

This commit is contained in:
Thomas Nordquist
2019-04-07 20:16:48 +02:00
parent 16c72fa9be
commit e2c60cca64
44 changed files with 306 additions and 529 deletions

View File

@@ -0,0 +1,34 @@
import * as React from 'react'
import { IconButton } from '@material-ui/core'
import { Theme, withStyles } from '@material-ui/core/styles'
interface Props {
onClick: any,
classes: any,
}
const styles = (theme: Theme) => ({
button: {
padding: '6px',
fontSize: '1.2em',
},
})
class CustomIconButton extends React.Component<Props, {}> {
constructor(props: Props) {
super(props)
}
private onClick = (event: React.MouseEvent) => {
event.stopPropagation()
this.props.onClick(event)
}
public render() {
return (
<IconButton className={this.props.classes.button} onClick={this.onClick}>{this.props.children}</IconButton>
)
}
}
export default withStyles(styles)(CustomIconButton)