How do I use a CSS module class in a function?
an example: I have the className {styles.item} but I want to use that within a function such as...
export default function MenuItem {
if(props.type == "extra"){
{styles.item}.classList.add("extra");
}
return (
<MenuItem name="test product" type="extra" />
);
}
I have tried using it just as styles, with {} and with ${}
So what I want to do is if the has a type of "extra" then I want to add a dashed border.