Skip to content

Commit

Permalink
Function declarartion pattern changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
roydebangshu committed Mar 24, 2020
1 parent 4205738 commit e078493
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
const _ = require('lodash')

module.exports = function() {
return function({ addUtilities, e, theme, variants }) {
const utilities = _.fromPairs(
_.map(theme('textShadow'), (value, modifier) => {
const className = modifier === 'default' ? 'text-shadow' : `${e(`text-shadow-${modifier}`)}`
return [
`.${className}`,
{
'text-shadow': value,
},
]
})
)
addUtilities(utilities, variants('textShadow'))
}
module.exports = function({ addUtilities, e, theme, variants }) {
const utilities = _.fromPairs(
_.map(theme('textShadow'), (value, modifier) => {
const className = modifier === 'default' ? 'text-shadow' : `${e(`text-shadow-${modifier}`)}`
return [
`.${className}`,
{
'text-shadow': value,
},
]
})
)
addUtilities(utilities, variants('textShadow'))
}

0 comments on commit e078493

Please sign in to comment.