hi i am new to lwc i want to remove or add css onclick , for simply explain now i have selected resource then its open and have green color if i select collaboration now it should be green collaboration and remove green color from resource another case if i click outside this pic then green color should be removed anyhelp
For now, I am using this code-every onclick call for function and give all others none to css variable used in html page
openpartner(event){
var e=event.target;
this.greenclr7='greencolor7';
this.greenclr6='';
this.greenclr4='';
this.greenclr5='';
this.greenclr3='';
this.greenclr2='';
this.greenclr1='';
this.partButton= !this.partButton;
this.partCss= this.partButton ? 'addpart' : 'removepart';
if(e.className==='signclass'){
e.className = 'xyz';
}
else
{
e.className='signclass';
}
}