From d2b2722b2ef9b7107bf31cf3f515abc464d57045 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Sat, 26 Aug 2017 15:49:20 -0400 Subject: [PATCH] Simplify backgroundColor generator --- src/generators/backgroundColors.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/generators/backgroundColors.js b/src/generators/backgroundColors.js index da4f5c0de..462f8a02d 100644 --- a/src/generators/backgroundColors.js +++ b/src/generators/backgroundColors.js @@ -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() + }) }