Skip to content

Commit 89119ae

Browse files
committed
converted from components to base
1 parent ab56ef7 commit 89119ae

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/index.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,17 @@ const api = require('./pluginApi')
88
*/
99
module.exports = plugin.withOptions(
1010
function (options) {
11-
return function ({ addComponents, theme, config }) {
11+
return function ({ addBase, theme, config }) {
1212
let darkMode = config('darkMode')
1313
let variables = theme('variables', {})
1414
let darkVariables = theme('darkVariables', {})
15-
// console.log(theme('variables', {}))
16-
// let darkVariables = merge(
17-
// theme('darkVariables', {}),
18-
// has(options, 'theme.darkVariables')
19-
// ? options.theme.darkVariables(theme)
20-
// ? options.theme.darkVariables(theme)
21-
// : {}
22-
// : {}
23-
// )
2415

2516
if (!isEmpty(variables)) {
26-
addComponents(api.variables(variables, options))
17+
addBase(api.variables(variables, options))
2718
}
2819

2920
if (!isEmpty(darkVariables) && (darkMode === 'class' || darkMode === 'media')) {
30-
addComponents(api.darkVariables(darkVariables, options, darkMode))
21+
addBase(api.darkVariables(darkVariables, options, darkMode))
3122
}
3223
}
3324
},

0 commit comments

Comments
 (0)