Why is it that in tailwind, bg-[#5ad0a1]
works but assigning the hex value to a variable such as const color = '#5ad0a1';
, and then using bg-[${color}]
does not work?
<span className={`inline-flex items-center rounded-md bg-[${color}] px-2 py-2 text-md font-base text-[${color}]`}>
{params?.value}
</span>