Skip to content

Commit

Permalink
Fix function colors bug (#2919)
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanVann authored and adamwathan committed May 7, 2021
1 parent f1ee046 commit c629ebb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/evaluateTailwindFunctions.js
Expand Up @@ -78,6 +78,7 @@ function validatePath(config, path, defaultValue) {
!(
typeof value === 'string' ||
typeof value === 'number' ||
typeof value === 'function' ||
value instanceof String ||
value instanceof Number ||
Array.isArray(value)
Expand Down
4 changes: 4 additions & 0 deletions src/util/transformThemeValue.js
Expand Up @@ -21,5 +21,9 @@ export default function transformThemeValue(themeSection) {
return (value) => (Array.isArray(value) ? value.join(', ') : value)
}

if (themeSection === 'colors') {
return (value) => (typeof value === 'function' ? value({}) : value)
}

return (value) => value
}

0 comments on commit c629ebb

Please sign in to comment.