Port appearance module to plugin

This commit is contained in:
Adam Wathan 2019-01-09 21:52:22 -05:00
parent a6e96c8919
commit a0de7e0963
4 changed files with 9 additions and 9 deletions

View File

@ -1,3 +1,4 @@
import appearance from './plugins/appearance'
import backgroundAttachment from './plugins/backgroundAttachment'
import backgroundColors from './plugins/backgroundColors'
import backgroundPosition from './plugins/backgroundPosition'
@ -49,6 +50,7 @@ import zIndex from './plugins/zIndex'
export default function (config) {
return [
config.modules.appearance === false ? () => {} : appearance(),
config.modules.backgroundAttachment === false ? () => {} : backgroundAttachment(),
config.modules.backgroundColors === false ? () => {} : backgroundColors(),
config.modules.backgroundPosition === false ? () => {} : backgroundPosition(),

View File

@ -1,7 +0,0 @@
import defineClasses from '../util/defineClasses'
export default function() {
return defineClasses({
'appearance-none': { appearance: 'none' },
})
}

View File

@ -0,0 +1,7 @@
export default function () {
return function ({ addUtilities, config }) {
addUtilities({
'.appearance-none': { appearance: 'none' },
}, config('modules.appearance'))
}
}

View File

@ -1,7 +1,5 @@
import lists from './generators/lists'
import appearance from './generators/appearance'
export default [
{ name: 'lists', generator: lists },
{ name: 'appearance', generator: appearance },
]