mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-26 07:22:44 +00:00
Disable the BrewSnippets menu if empty.
This commit is contained in:
@@ -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)}
|
||||
|
||||
@@ -231,6 +231,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.disabledSnippets {
|
||||
color: grey;
|
||||
cursor: not-allowed;
|
||||
|
||||
&:hover { background-color: #DDDDDD;}
|
||||
}
|
||||
|
||||
}
|
||||
@container editor (width < 553px) {
|
||||
.snippetBar {
|
||||
|
||||
Reference in New Issue
Block a user