I feel like i'm doing it correctly as per the documentations but it's not happening. I know there are similar questions but somehow my code isn't working. It's not compiling the class properly.
This is my code which is clickable if the user roles are correct.
<h4
onClick={(e) => {
e.stopPropagation();
if (this.props.role === 'owner' || this.props.role === 'member' || this.state.task.OwnerId === user_Proj.User.ID) {
this.setState({MakeConfirm: true})
}
}}
className="title {this.props.role === 'owner' ? 'owner__yes':'owner__no'}"
>
Button
</h4>
The output isn't compiling the CSS class. Here's the output which needs fixing.
<h4 class="complete {this.props.role === 'owner' ? 'owner__yes':'owner__no'}">Button</h4>