I have couple of react components created in bit src sope with tailwind environment.(bit src , tailwind environment ).
Its working fine with following variations.
- built in classes i.e. w-0 w-1 w-2 w-4 ...
- Pre define values i.e. w-[24px] bg-[#123456] ...
Its Not working with dynamic values provided by variable in run time as following. Throwing error saying CssSyntaxError (1:0) D:\Auzmor\office_component_library\node_modules\@auzmorui\component-library.tailwind.environments.env-with-tailwind\dist\tailwind\<no source> Unknown word
const width = 24
<div classname={`w-[${width}px]`}
tailwind.config.js
module.exports = {
mode: 'jit',
content: ['component-library/components/**/*.{js,jsx,ts,tsx}'],
theme: {}
}
Tailwind version
"tailwindcss": "3.1.6"