File tree 1 file changed +14
-11
lines changed
1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const [baseFontSize, { lineHeight: baseLineHeight }] = defaultTheme.fontSize.bas
6
6
const { spacing, borderWidth, borderRadius } = defaultTheme
7
7
8
8
const forms = plugin . withOptions ( function ( options = { strategy : 'base' } ) {
9
- return function ( { addBase, theme } ) {
9
+ return function ( { addBase, addComponents , theme } ) {
10
10
const strategy = options . strategy
11
11
12
12
const rules = [
@@ -252,17 +252,20 @@ const forms = plugin.withOptions(function (options = { strategy: 'base' }) {
252
252
} ,
253
253
]
254
254
255
- addBase (
256
- rules
257
- . map ( ( rule ) => {
258
- if ( rule [ strategy ] === null ) {
259
- return null
260
- }
255
+ const strategyRules = rules
256
+ . map ( ( rule ) => {
257
+ if ( rule [ strategy ] === null ) {
258
+ return null
259
+ }
261
260
262
- return { [ rule [ strategy ] ] : rule . styles }
263
- } )
264
- . filter ( Boolean )
265
- )
261
+ return { [ rule [ strategy ] ] : rule . styles }
262
+ } )
263
+ . filter ( Boolean )
264
+
265
+ ; ( {
266
+ 'base' : addBase ,
267
+ 'class' : addComponents
268
+ } ) [ strategy ] ( strategyRules )
266
269
}
267
270
} )
268
271
You can’t perform that action at this time.
0 commit comments