I only want a particular div to display if showHideClassName is set to the value of true. I have this code in my React application so that a div will either display or not depending on the status of showHideClassName:
render() {
...
const showHideClassName = showPrompt ? 'show-div' : 'display-none';
return (
<div className={showHideClassName}>
...
</div>
);
}
The div is always visible though. Is there any way I can get this to work as I desire?
I don't have display-none in my css. Now that I've added the below, it works ad desired.
.display-none { display: none; }