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 Feb 7, 2021
1 parent e86b586 commit 33dcd44
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 33dcd44

Please sign in to comment.