Skip to content

Commit

Permalink
feat: update config closure evaluator to evaluate new tailwind3 configs
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadsammy committed Dec 12, 2021
1 parent d6c369e commit 440c1ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cli/core/TailwindConfigParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import _ from 'lodash';
import {defaultTailwindConfig} from '../lib/defaultTailwindConfig';
import {TTailwindCSSConfig, TConfigDarkMode, TConfigPlugins} from '../types/config';
import {TConfigTheme, TThemeItems} from '../types/config';
import {tailwindColors} from './constants/tailwindColors';
/* eslint-disable @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-return */

/**
Expand Down Expand Up @@ -136,7 +137,9 @@ class ThemeClosuresEvaluator {
// If a value is a function...
if (_.isFunction(value)) {
// evaluate the value by running the evaluator methods in this class.
return value(this.makeThemePathResolver(valueSourceTheme || this.themeConfig), {
return value({
colors: tailwindColors,
theme: this.makeThemePathResolver(valueSourceTheme || this.themeConfig),
negative: ThemeClosuresEvaluator.negative.bind(this),
breakpoints: ThemeClosuresEvaluator.breakpoints.bind(this),
});
Expand Down

0 comments on commit 440c1ed

Please sign in to comment.