2019-01-09 13:17:49 -05:00
|
|
|
import _ from 'lodash'
|
|
|
|
|
|
2019-02-28 11:51:23 -05:00
|
|
|
export default function() {
|
2019-04-18 23:29:07 +02:00
|
|
|
return function({ addUtilities, e, theme, variants }) {
|
2019-01-11 12:29:33 -05:00
|
|
|
const utilities = _.fromPairs(
|
2019-04-18 23:29:07 +02:00
|
|
|
_.map(theme('boxShadow'), (value, modifier) => {
|
2019-01-11 12:29:33 -05:00
|
|
|
const className = modifier === 'default' ? 'shadow' : `shadow-${modifier}`
|
|
|
|
|
return [
|
|
|
|
|
`.${e(className)}`,
|
|
|
|
|
{
|
|
|
|
|
'box-shadow': value,
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
)
|
2019-01-09 13:17:49 -05:00
|
|
|
|
2019-04-18 09:42:21 -04:00
|
|
|
addUtilities(utilities, variants('boxShadow'))
|
2019-01-09 13:17:49 -05:00
|
|
|
}
|
|
|
|
|
}
|