0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-06 14:22:52 +00:00

Disable the BrewSnippets menu if empty.

This commit is contained in:
David Bolack
2024-12-20 21:47:05 -06:00
parent 5f54777663
commit ed099aa061
2 changed files with 10 additions and 3 deletions

View File

@@ -322,11 +322,11 @@ const SnippetGroup = createClass({
},
render : function(){
const groupName = `groupName ${this.props.snippets.length === 0 ? 'disabled' : ''}`;
return <div className='snippetGroup snippetBarButton'>
const snippetGroup = `snippetGroup snippetBarButton ${this.props.snippets.length === 0 ? 'disabledSnippets' : ''}`;
return <div className={snippetGroup}>
<div className='text'>
<i className={this.props.icon} />
<span className={groupName}>{this.props.groupName}</span>
<span className='groupName'>{this.props.groupName}</span>
</div>
<div className='dropdown'>
{this.renderSnippets(this.props.snippets)}