Port minWidth module to plugin
This commit is contained in:
parent
1ff01435e7
commit
b140bf66fb
4 changed files with 15 additions and 16 deletions
13
src/plugins/minWidth.js
Normal file
13
src/plugins/minWidth.js
Normal 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'))
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue