From fef2d3a16f96ae32812cfe206896b8437a4abdb9 Mon Sep 17 00:00:00 2001 From: Brian Akpa Date: Wed, 10 Apr 2019 12:23:16 -0400 Subject: [PATCH] fix: Fixed background color class name reference functionality for Box components --- dev/views/Box.vue | 3 +- src/components/FishTankBox.vue | 6 +- src/styles/box/box-colors.css | 682 --------------------------------- src/util/ColorsClassMapping.ts | 166 +------- vue-shim.d.ts | 4 +- 5 files changed, 17 insertions(+), 844 deletions(-) delete mode 100644 src/styles/box/box-colors.css diff --git a/dev/views/Box.vue b/dev/views/Box.vue index 5f3bce0..3b4e153 100644 --- a/dev/views/Box.vue +++ b/dev/views/Box.vue @@ -30,7 +30,8 @@ Text in a FishTankBox component in a 8 column space - + Text in another box justified in the remaining space, shared equally diff --git a/src/components/FishTankBox.vue b/src/components/FishTankBox.vue index c5c7f7f..e67491d 100644 --- a/src/components/FishTankBox.vue +++ b/src/components/FishTankBox.vue @@ -24,7 +24,7 @@ import { rangeWithoutZero } from '../util/transform' -import color from '../util/ColorsClassMapping' +import color from '../util/colorsClassMapping' const _ = require("lodash").noConflict() export type IsBoxType = "div" | "span" | "section" | "article" | "aside" | "footer" | "header" | "details" | "figcaption" | "figure" | "main" | "nav" | "summary" | "time"; @@ -43,10 +43,11 @@ export type Color = any let colorMappingFunc = (value:any) => { if (!value) return identity() - let allColorMappings = mapping(color) + let allColorMappings = mapping(color()) let mapColorNameToClass = (colorName:String) => { let [prefix, rest] = [colorName[0], colorName.substring(1, colorName.length)] let colorClassName = `color${prefix.toUpperCase()}${rest}Bg` + // debugger return colorClassName } return allColorMappings(mapColorNameToClass(value)) @@ -620,7 +621,6 @@ export default Vue.extend({ })