function resolveThemeTokens(theme, obj) {
  const result = {}

  for (const key of Object.keys(obj)) {
    const raw = obj[key]

    if (raw === null) {
      continue
    }

    if (typeof raw === 'object') {
      result[key] = resolveThemeTokens(theme, raw)
    } else {
      result[key] = getValue(theme, raw)
    }
  }

  return result
}
Resolves an object (or style config) when referencing theme paths
It will preserve the original object structure (nesting)
@param {object} theme
@param {object} obj
@returns {object} a new object with theme-resolved properties