refactor: use theme for chips
This commit is contained in:
parent
4f17fbc384
commit
ac97e2ffd9
6 changed files with 20 additions and 49 deletions
|
|
@ -1,34 +0,0 @@
|
||||||
import Chip from '@mui/material/Chip'
|
|
||||||
import { withStyles } from '@mui/styles'
|
|
||||||
import React, { memo } from 'react'
|
|
||||||
|
|
||||||
import {
|
|
||||||
fontColor,
|
|
||||||
inputFontWeight,
|
|
||||||
subheaderColor,
|
|
||||||
smallestFontSize,
|
|
||||||
inputFontFamily
|
|
||||||
} from 'src/styling/variables'
|
|
||||||
|
|
||||||
const styles = theme => ({
|
|
||||||
root: {
|
|
||||||
backgroundColor: subheaderColor,
|
|
||||||
borderRadius: 4,
|
|
||||||
margin: theme.spacing(0.5, 0.25),
|
|
||||||
height: 18
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
fontSize: smallestFontSize,
|
|
||||||
color: fontColor,
|
|
||||||
fontWeight: inputFontWeight,
|
|
||||||
fontFamily: inputFontFamily,
|
|
||||||
paddingRight: 4,
|
|
||||||
paddingLeft: 4
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const LsChip = memo(({ classes, ...props }) => (
|
|
||||||
<Chip size="small" classes={classes} {...props} />
|
|
||||||
))
|
|
||||||
|
|
||||||
export default withStyles(styles)(LsChip)
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { makeStyles } from '@mui/styles'
|
import { makeStyles } from '@mui/styles'
|
||||||
|
import Chip from '@mui/material/Chip'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import Chip from 'src/components/Chip'
|
|
||||||
import { P, Label3 } from 'src/components/typography'
|
import { P, Label3 } from 'src/components/typography'
|
||||||
import CloseIcon from 'src/styling/icons/action/close/zodiac.svg?react'
|
import CloseIcon from 'src/styling/icons/action/close/zodiac.svg?react'
|
||||||
import FilterIcon from 'src/styling/icons/button/filter/white.svg?react'
|
import FilterIcon from 'src/styling/icons/button/filter/white.svg?react'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { makeStyles } from '@mui/styles'
|
import { makeStyles } from '@mui/styles'
|
||||||
|
import Chip from '@mui/material/Chip'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import Chip from 'src/components/Chip'
|
|
||||||
import { Info2, Label1, Label2 } from 'src/components/typography'
|
import { Info2, Label1, Label2 } from 'src/components/typography'
|
||||||
|
|
||||||
import { numberToFiatAmount } from 'src/utils/number'
|
import { numberToFiatAmount } from 'src/utils/number'
|
||||||
|
|
@ -136,10 +136,7 @@ const CashOut = ({
|
||||||
<div className={classes.col2}>
|
<div className={classes.col2}>
|
||||||
<div className={classes.innerRow}>
|
<div className={classes.innerRow}>
|
||||||
<Info2 className={classes.noMarginText}>{notes}</Info2>
|
<Info2 className={classes.noMarginText}>{notes}</Info2>
|
||||||
<Chip
|
<Chip label={`${denomination} ${currency.code}`} />
|
||||||
className={classes.chip}
|
|
||||||
label={`${denomination} ${currency.code}`}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div className={classes.innerRow}>
|
<div className={classes.innerRow}>
|
||||||
<Label1 className={classes.noMarginText}>
|
<Label1 className={classes.noMarginText}>
|
||||||
|
|
|
||||||
|
|
@ -79,9 +79,6 @@ const gridStyles = {
|
||||||
},
|
},
|
||||||
link: {
|
link: {
|
||||||
marginTop: spacer
|
marginTop: spacer
|
||||||
},
|
|
||||||
chip: {
|
|
||||||
margin: [[0, 0, 0, 7]]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { makeStyles } from '@mui/styles'
|
import { makeStyles } from '@mui/styles'
|
||||||
|
import Chip from '@mui/material/Chip'
|
||||||
import * as R from 'ramda'
|
import * as R from 'ramda'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import Chip from 'src/components/Chip'
|
|
||||||
import { Label1, TL2 } from 'src/components/typography'
|
import { Label1, TL2 } from 'src/components/typography'
|
||||||
|
|
||||||
import { CashOut } from 'src/components/inputs'
|
import { CashOut } from 'src/components/inputs'
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,13 @@ import {
|
||||||
offColor,
|
offColor,
|
||||||
subheaderColor,
|
subheaderColor,
|
||||||
fontSize3,
|
fontSize3,
|
||||||
fontSize5,
|
|
||||||
zircon,
|
zircon,
|
||||||
zircon2,
|
zircon2,
|
||||||
primaryColor, disabledColor2, disabledColor
|
primaryColor,
|
||||||
|
disabledColor2,
|
||||||
|
disabledColor,
|
||||||
|
smallestFontSize,
|
||||||
|
inputFontWeight
|
||||||
} from './variables'
|
} from './variables'
|
||||||
|
|
||||||
const { p } = typographyStyles
|
const { p } = typographyStyles
|
||||||
|
|
@ -150,11 +153,19 @@ theme = createTheme(theme, {
|
||||||
},
|
},
|
||||||
MuiChip: {
|
MuiChip: {
|
||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
|
root: {
|
||||||
|
backgroundColor: subheaderColor,
|
||||||
|
borderRadius: 4,
|
||||||
|
margin: theme.spacing(0.5, 0.25),
|
||||||
|
height: 18
|
||||||
|
},
|
||||||
label: {
|
label: {
|
||||||
paddingLeft: 4,
|
fontSize: smallestFontSize,
|
||||||
paddingRight: 4,
|
|
||||||
color: fontColor,
|
color: fontColor,
|
||||||
fontSize: fontSize5
|
fontWeight: inputFontWeight,
|
||||||
|
fontFamily: inputFontFamily,
|
||||||
|
paddingRight: 4,
|
||||||
|
paddingLeft: 4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue