export default {
  name: 'colorable',

  props: {
    color: [Boolean, String]
  },

  data () {
    return {
      defaultColor: null
    }
  },

  computed: {
    computedColor () {
      return this.color || this.defaultColor
    }
  },

  methods: {
    addBackgroundColorClassChecks (obj = {}, color = this.computedColor) {
      const classes = Object.assign({}, obj)

      if (color) {
        classes[color] = true
      }

      return classes
    },
    addTextColorClassChecks (obj = {}, color = this.computedColor) {
      const classes = Object.assign({}, obj)

      if (color) {
        const [colorName, colorModifier] = color.toString().trim().split(' ')
        classes[colorName + '--text'] = true
        colorModifier && (classes['text--' + colorModifier] = true)
      }

      return classes
    }
  }
}

@@ -57,26 +57,15 @@
 lor:
- %5BBoolean,
  String
-%5D
 %0A  %7D

remove Boolean from color prop