chore: use proper name convention for build tools
This commit is contained in:
parent
62f39f3561
commit
d646aee24b
283 changed files with 353 additions and 422 deletions
46
new-lamassu-admin/src/components/buttons/IconButton.jsx
Normal file
46
new-lamassu-admin/src/components/buttons/IconButton.jsx
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
import { makeStyles, IconButton as IconB } from '@material-ui/core'
|
||||
import React from 'react'
|
||||
|
||||
import { comet } from 'src/styling/variables'
|
||||
|
||||
const styles = {
|
||||
label: ({ size }) => ({
|
||||
width: size,
|
||||
height: size
|
||||
}),
|
||||
root: {
|
||||
'& svg': {
|
||||
flex: 1
|
||||
},
|
||||
'&:hover': {
|
||||
backgroundColor: 'inherit'
|
||||
},
|
||||
'&:hover rect': {
|
||||
stroke: comet
|
||||
},
|
||||
'&:hover polygon': {
|
||||
stroke: comet
|
||||
},
|
||||
'&:hover path': {
|
||||
stroke: comet
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const useStyles = makeStyles(styles)
|
||||
|
||||
const IconButton = ({ size, children, onClick, ...props }) => {
|
||||
const classes = useStyles({ size })
|
||||
return (
|
||||
<IconB
|
||||
{...props}
|
||||
size="small"
|
||||
classes={{ root: classes.root, label: classes.label }}
|
||||
disableRipple
|
||||
onClick={onClick}>
|
||||
{children}
|
||||
</IconB>
|
||||
)
|
||||
}
|
||||
|
||||
export default IconButton
|
||||
Loading…
Add table
Add a link
Reference in a new issue