Add support for "tailwind" function to look up config values
This commit is contained in:
parent
b358390e8b
commit
ba04169e4e
8 changed files with 45 additions and 12 deletions
|
|
@ -1,10 +1,9 @@
|
|||
import _ from 'lodash'
|
||||
import defineClass from '../util/defineClass'
|
||||
import normalizeColorList from '../util/normalizeColorList'
|
||||
import hoverable from '../util/hoverable'
|
||||
|
||||
export default function ({ colors, backgrounds }) {
|
||||
return hoverable(_.map(normalizeColorList(backgrounds.colors, colors), (color, className) => {
|
||||
export default function ({ backgrounds }) {
|
||||
return hoverable(_.map(backgrounds.colors, (color, className) => {
|
||||
return defineClass(`bg-${className}`, {
|
||||
'background-color': color,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
import _ from 'lodash'
|
||||
import defineClass from '../util/defineClass'
|
||||
import normalizeColorList from '../util/normalizeColorList'
|
||||
import hoverable from '../util/hoverable'
|
||||
|
||||
export default function ({ colors, borders }) {
|
||||
const borderColors = normalizeColorList(borders.colors, colors)
|
||||
|
||||
return hoverable(_.map(borderColors, (color, className) => {
|
||||
return hoverable(_.map(borders.colors, (color, className) => {
|
||||
return defineClass(`border-${className}`, {
|
||||
'border-color': color,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
import _ from 'lodash'
|
||||
import defineClass from '../util/defineClass'
|
||||
import normalizeColorList from '../util/normalizeColorList'
|
||||
import hoverable from '../util/hoverable'
|
||||
|
||||
export default function ({ colors, text }) {
|
||||
return hoverable(_.map(normalizeColorList(text.colors, colors), (color, modifier) => {
|
||||
return hoverable(_.map(text.colors, (color, modifier) => {
|
||||
return defineClass(`text-${modifier}`, {
|
||||
'color': color,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue