my tailwind.config.js is like this
<code>const plugin = require("tailwindcss/plugin");
module.exports = {
plugins: [
plugin(function ({ addUtilities}) {
addUtilities({
".heading3": {
color: "#1F9D55",
fontSize: "1rem",
lineHeight: "26px"
},
});
}),
],
};
</code>
<code>const plugin = require("tailwindcss/plugin");
module.exports = {
plugins: [
plugin(function ({ addUtilities}) {
addUtilities({
".heading3": {
color: "#1F9D55",
fontSize: "1rem",
lineHeight: "26px"
},
});
}),
],
};
</code>
const plugin = require("tailwindcss/plugin");
module.exports = {
plugins: [
plugin(function ({ addUtilities}) {
addUtilities({
".heading3": {
color: "#1F9D55",
fontSize: "1rem",
lineHeight: "26px"
},
});
}),
],
};
then i try to use heading3
in somewhere like
<Text className='heading3'>hello</Text>
however, it is not working.
then i try to use it in twrnc
, which is another compine tools to work between tailwindcss and react-native.
and i try to use like this <Text style={tw`heading3`}>hello</Text>
and it can work.
but i prefer use the className
way instead of style and tw function
way.
so how NativeWind can support the class defined in custom plugin?