I am making simple 'todo' project to improve my react skill one of it feature choosing the color of task card, but I can't figure out why my approach doesn't work. Here the code
:
import React from "react";
const TaskCard: React.FC = () => {
let color = "sky";
return (
<div>
<div className="bg-white h-[80px] w-[100%] flex flex-row rounded-md">
<div className={`p-1 bg-${color}-400`}></div>
</div>
</div>
);
};
export default TaskCard;
this is just a sample of the code my problem is ${}
doesn't work, it work when I hard code it.