i am using tailwindcss
in an Expo project, and i try to use some custom color in custom plugin function,however,i got an error says Error: tailwindcss plugin function argument object prop "colors.primary" not implemented, js engine: hermes
meanwhile, if i just comment out that line theme("colors.primary")
.
i then test the addComponents
function, it continue tells me another error Error: tailwindcss plugin function argument object prop "[object Object]" not implemented, js engine: hermes
my tailwind.config.js is like this
const plugin = require("tailwindcss/plugin");
module.exports = {
theme: {
extend: {
colors: {
primary: "#1F9D55",
secondary: "#B7DDC1",
tertiary: "#F7FFF9"
},
},
},
plugins: [
plugin(function ({ addComponents, theme }) {
//it should be print out '#1F9D55', which the color value defined above
console.log(theme("colors.primary"));
// it should register a new class called `heading3`
addComponents({
".heading3": {
fontSize: "1rem",
lineHeight: "26px",
"@screen md": {
fontSize: "24px",
lineHeight: "32px",
},
},
});
}),
],
};
anyone have some experises about how to use custom plugin in tailwindcss under expo?
PS:i use nativewind
to combine tailwindcss with expo.