Simplify backgroundColor generator
This commit is contained in:
parent
7ae71315f9
commit
d2b2722b2e
1 changed files with 2 additions and 4 deletions
|
|
@ -3,11 +3,9 @@ import defineClass from '../util/defineClass'
|
|||
import normalizeColorList from '../util/normalizeColorList'
|
||||
|
||||
export default function ({ colors, backgroundColors }) {
|
||||
backgroundColors = normalizeColorList(backgroundColors, colors)
|
||||
|
||||
return _(backgroundColors).toPairs().map(([className, color]) => {
|
||||
return _.map(normalizeColorList(backgroundColors, colors), (color, className) => {
|
||||
return defineClass(`bg-${className}`, {
|
||||
backgroundColor: color,
|
||||
})
|
||||
}).value()
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue