account for function values in theme function
This commit is contained in:
parent
be3be14586
commit
caa687a59b
1 changed files with 4 additions and 1 deletions
|
|
@ -25,7 +25,10 @@ function mergeExtensions({ extend, ...theme }) {
|
|||
}
|
||||
|
||||
function resolveFunctionKeys(object) {
|
||||
const resolveObjectPath = (key, defaultValue) => get(object, key, defaultValue)
|
||||
const resolveObjectPath = (key, defaultValue) => {
|
||||
const val = get(object, key, defaultValue)
|
||||
return isFunction(val) ? val(resolveObjectPath) : val
|
||||
}
|
||||
|
||||
return Object.keys(object).reduce((resolved, key) => {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue