feat: add new server log page
This commit is contained in:
parent
fc1951c4b2
commit
703c5d7c91
38 changed files with 2844 additions and 29 deletions
50
new-lamassu-admin/src/components/buttons/FeatureButton.js
Normal file
50
new-lamassu-admin/src/components/buttons/FeatureButton.js
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
import React, { memo } from 'react'
|
||||
import classnames from 'classnames'
|
||||
import { makeStyles } from '@material-ui/core/styles'
|
||||
|
||||
import baseButtonStyles from './BaseButton.styles'
|
||||
|
||||
const { baseButton, primary } = baseButtonStyles
|
||||
|
||||
const svgSize = 25
|
||||
|
||||
const styles = {
|
||||
featureButton: {
|
||||
extend: baseButton,
|
||||
width: baseButton.height,
|
||||
borderRadius: baseButton.height / 2,
|
||||
display: 'flex'
|
||||
},
|
||||
primary,
|
||||
buttonIcon: {
|
||||
margin: 'auto',
|
||||
'& svg': {
|
||||
width: svgSize,
|
||||
height: svgSize
|
||||
}
|
||||
},
|
||||
buttonIconActive: {} // required to extend primary
|
||||
}
|
||||
|
||||
const useStyles = makeStyles(styles)
|
||||
|
||||
const FeatureButton = memo(({ className, Icon, InverseIcon, ...props }) => {
|
||||
const classes = useStyles()
|
||||
|
||||
const classNames = {
|
||||
[classes.featureButton]: true,
|
||||
[classes.primary]: true
|
||||
}
|
||||
|
||||
return (
|
||||
<button className={classnames(classNames, className)} {...props}>
|
||||
{Icon && <div className={classes.buttonIcon}><Icon /></div>}
|
||||
{InverseIcon &&
|
||||
<div className={classnames(classes.buttonIcon, classes.buttonIconActive)}>
|
||||
<InverseIcon />
|
||||
</div>}
|
||||
</button>
|
||||
)
|
||||
})
|
||||
|
||||
export default FeatureButton
|
||||
Loading…
Add table
Add a link
Reference in a new issue