Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const [baseFontSize, { lineHeight: baseLineHeight }] = defaultTheme.fontSize.bas
const { colors, spacing, borderWidth, borderRadius, outline } = defaultTheme

const forms = plugin.withOptions(function (options = { strategy: 'base' }) {
return function ({ addBase, theme }) {
return function ({ addBase, addComponents, theme }) {
const strategy = options.strategy

const rules = [
Expand Down Expand Up @@ -249,7 +249,10 @@ const forms = plugin.withOptions(function (options = { strategy: 'base' }) {
},
]

addBase(
({
'base': (rules) => addBase(rules),
'class': (rules) => addComponents(rules)
})[strategy](
rules
.map((rule) => {
if (rule[strategy] === null) {
Expand Down