0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-30 08:52:38 +00:00

Initial UI functionality for most Lock functions

This commit is contained in:
G.Ambatte
2024-05-11 23:58:37 +12:00
parent 1fe2a26e83
commit e7dc757293
5 changed files with 240 additions and 12 deletions

View File

@@ -8,7 +8,9 @@ const BrewLookup = require('./brewLookup/brewLookup.jsx');
const BrewCompress = require ('./brewCompress/brewCompress.jsx');
const Stats = require('./stats/stats.jsx');
const tabGroups = ['brews'];
const LockTools = require('./lockTools/lockTools.jsx');
const tabGroups = ['brews', 'locks'];
const Admin = createClass({
getDefaultProps : function() {
@@ -52,10 +54,11 @@ const Admin = createClass({
<div className='container'>
<div className='tabs'>
{tabGroups.map((name, idx)=>{
return <button className='tab' key={idx} onClick={()=>{return this.handleClick(name);}}>{name.toUpperCase()}</button>;
return <button className={`tab ${this.state.currentTab === name ? 'active' : ''}`} key={idx} onClick={()=>{return this.handleClick(name);}}>{name.toUpperCase()}</button>;
})}
</div>
{this.state.currentTab == 'brews' && this.renderBrewTools()}
{this.state.currentTab == 'locks' && <LockTools />}
</div>
</div>;
}