0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-30 06:42:45 +00:00

Add styling to active tab

This commit is contained in:
G.Ambatte
2023-01-05 10:52:24 +13:00
parent ec040cc2bb
commit f5c7761c61
2 changed files with 22 additions and 3 deletions

View File

@@ -27,7 +27,6 @@ const Admin = createClass({
render : function(){
return <div className='admin'>
<header>
<div className='container'>
<i className='fas fa-rocket' />
@@ -36,7 +35,7 @@ const Admin = createClass({
</header>
<div className='container'>
<div className='tabs'>
{tabGroups.map((tab, idx)=>{ return <button key={idx} onClick={()=>{ return this.handleClick(tab); }}>{tab.toUpperCase()}</button>; })}
{tabGroups.map((tab, idx)=>{ return <button className={tab===this.state.currentTab ? 'active' : ''} key={idx} onClick={()=>{ return this.handleClick(tab); }}>{tab.toUpperCase()}</button>; })}
</div>
{this.state.currentTab==='brew' && <BrewUtils />}
{this.state.currentTab==='notifications' && <NotificationUtils />}

View File

@@ -40,5 +40,25 @@ body{
margin : 30px 0px;
}
.container{
.tabs button{
background-color: #eee;
margin-left: 3px;
margin-right: 3px;
border: 1px solid #444;
border-radius: 5px;
color: black;
&:hover{
background-color: #444;
color: #eee;
}
&.active{
border: 2px solid #444;
text-decoration: underline;
margin-left: 2px;
margin-right: 2px;
background-color: #ccc;
}
}
}
}