vadimdemedes / tailwind-rn

🦎 Use Tailwind CSS in React Native projects

Repository from Github https://github.comvadimdemedes/tailwind-rnRepository from Github https://github.comvadimdemedes/tailwind-rn

Custom theme unknown or invalid utility

oktalk opened this issue · comments

After fresh install I'm getting warnings for all of my custom classes defined in the tailwind config.

The warning is as follows:
crimson unknown or invalid utility

Here is my tailwind.config.js setup:

module.exports = {
  content: ['*.{js,jsx,ts,tsx}', './src/**/*.{js,jsx,ts,tsx}'],
  theme: {
    extend: {
      color: {
        crimson: '#DC1E37',
      },
    },
  },
  plugins: [],
  corePlugins: require('tailwind-rn/unsupported-core-plugins'),
};

And here is how I'm using it in my component:

<Text style={tw.style('text-crimson')}>
  I should be a red color.
</Text>

Any thoughts on why I would be getting that error? The npx setup-tailwind-rn command pretty much set everything up for me. And, all of the other Tailwind classes are working.

Upvote?