Skip to content

Commit

Permalink
Port appearance module to plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed Jan 14, 2019
1 parent a6e96c8 commit a0de7e0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 2 additions & 0 deletions src/defaultPlugins.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import appearance from './plugins/appearance'
import backgroundAttachment from './plugins/backgroundAttachment'
import backgroundColors from './plugins/backgroundColors'
import backgroundPosition from './plugins/backgroundPosition'
Expand Down Expand Up @@ -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(),
Expand Down
7 changes: 0 additions & 7 deletions src/generators/appearance.js

This file was deleted.

7 changes: 7 additions & 0 deletions src/plugins/appearance.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function () {
return function ({ addUtilities, config }) {
addUtilities({
'.appearance-none': { appearance: 'none' },
}, config('modules.appearance'))
}
}
2 changes: 0 additions & 2 deletions src/utilityModules.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import lists from './generators/lists'
import appearance from './generators/appearance'

export default [
{ name: 'lists', generator: lists },
{ name: 'appearance', generator: appearance },
]

0 comments on commit a0de7e0

Please sign in to comment.