Port minWidth module to plugin

This commit is contained in:
Adam Wathan 2019-01-09 21:09:34 -05:00
parent 1ff01435e7
commit b140bf66fb
4 changed files with 15 additions and 16 deletions

13
src/plugins/minWidth.js Normal file
View file

@ -0,0 +1,13 @@
import _ from 'lodash'
export default function () {
return function ({ addUtilities, config, e }) {
const utilities = _.fromPairs(_.map(config('minWidth'), (value, modifier) => {
return [`.${e(`min-w-${modifier}`)}`, {
'min-width': value,
}]
}))
addUtilities(utilities, config('modules.minWidth'))
}
}