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
|
|
@ -1,41 +0,0 @@
|
|||
import Grid from '@material-ui/core/Grid'
|
||||
import { makeStyles } from '@material-ui/core/styles'
|
||||
import classnames from 'classnames'
|
||||
import PropTypes from 'prop-types'
|
||||
import React from 'react'
|
||||
|
||||
import { white } from 'src/styling/variables'
|
||||
|
||||
const cardState = Object.freeze({
|
||||
DEFAULT: 'default',
|
||||
SHRUNK: 'shrunk',
|
||||
EXPANDED: 'expanded'
|
||||
})
|
||||
|
||||
const styles = {
|
||||
card: {
|
||||
wordWrap: 'break-word',
|
||||
boxShadow: '0 0 4px 0 rgba(0, 0, 0, 0.08)',
|
||||
borderRadius: 12,
|
||||
padding: 24,
|
||||
backgroundColor: white
|
||||
}
|
||||
}
|
||||
|
||||
const useStyles = makeStyles(styles)
|
||||
|
||||
const CollapsibleCard = ({ className, state, shrunkComponent, children }) => {
|
||||
const classes = useStyles()
|
||||
return (
|
||||
<Grid item className={classnames(className, classes.card)}>
|
||||
{state === cardState.SHRUNK ? shrunkComponent : children}
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
CollapsibleCard.propTypes = {
|
||||
shrunkComponent: PropTypes.node.isRequired
|
||||
}
|
||||
|
||||
export default CollapsibleCard
|
||||
export { cardState }
|
||||
Loading…
Add table
Add a link
Reference in a new issue