Skip to content

Commit

Permalink
fix(resolveConfig): global props name should be camelized
Browse files Browse the repository at this point in the history
  • Loading branch information
cloydlau committed Dec 7, 2023
1 parent 0abbedd commit 3840bf8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/resolveConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,13 @@ export default function resolveConfig(
if (slotName) {
res.slots[slotName] = config[k]
}
} else if (propsList.includes(kebabToCamel(k))) {
res.props[k] = config[k]
} else {
res.attrs[k] = config[k]
const camelizedKey = kebabToCamel(k)
if (propsList.includes(camelizedKey)) {
res.props[k] = camelizedKey
} else {
res.attrs[k] = config[k]
}
}
}

Expand Down

0 comments on commit 3840bf8

Please sign in to comment.