Port leading module to plugin

This commit is contained in:
Adam Wathan 2019-01-09 21:15:06 -05:00
parent 97da5c40d6
commit c8802df40d
4 changed files with 15 additions and 12 deletions

13
src/plugins/leading.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('leading'), (value, modifier) => {
return [`.${e(`leading-${modifier}`)}`, {
'line-height': value,
}]
}))
addUtilities(utilities, config('modules.leading'))
}
}