Handle inline theme keys in resolveWith
This commit is contained in:
parent
5078ccdc9f
commit
ea54594515
1 changed files with 14 additions and 3 deletions
|
|
@ -121,12 +121,23 @@ export class Theme {
|
|||
|
||||
let extra = {} as Record<string, string>
|
||||
for (let name of nestedKeys) {
|
||||
let nestedValue = this.#var(`${themeKey}${name}`)
|
||||
if (nestedValue) {
|
||||
extra[name] = nestedValue
|
||||
let nestedKey = `${themeKey}${name}`
|
||||
let nestedValue = this.values.get(nestedKey)!
|
||||
if (!nestedValue) continue
|
||||
|
||||
if (nestedValue.isInline) {
|
||||
extra[name] = nestedValue.value
|
||||
} else {
|
||||
extra[name] = this.#var(nestedKey)!
|
||||
}
|
||||
}
|
||||
|
||||
let value = this.values.get(themeKey)!
|
||||
|
||||
if (value.isInline) {
|
||||
return [value.value, extra]
|
||||
}
|
||||
|
||||
return [this.#var(themeKey)!, extra]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue