mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-29 09:02:37 +00:00
Disable the BrewSnippets menu if empty.
This commit is contained in:
@@ -322,11 +322,11 @@ const SnippetGroup = createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render : function(){
|
render : function(){
|
||||||
const groupName = `groupName ${this.props.snippets.length === 0 ? 'disabled' : ''}`;
|
const snippetGroup = `snippetGroup snippetBarButton ${this.props.snippets.length === 0 ? 'disabledSnippets' : ''}`;
|
||||||
return <div className='snippetGroup snippetBarButton'>
|
return <div className={snippetGroup}>
|
||||||
<div className='text'>
|
<div className='text'>
|
||||||
<i className={this.props.icon} />
|
<i className={this.props.icon} />
|
||||||
<span className={groupName}>{this.props.groupName}</span>
|
<span className='groupName'>{this.props.groupName}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className='dropdown'>
|
<div className='dropdown'>
|
||||||
{this.renderSnippets(this.props.snippets)}
|
{this.renderSnippets(this.props.snippets)}
|
||||||
|
|||||||
@@ -231,6 +231,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.disabledSnippets {
|
||||||
|
color: grey;
|
||||||
|
cursor: not-allowed;
|
||||||
|
|
||||||
|
&:hover { background-color: #DDDDDD;}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@container editor (width < 553px) {
|
@container editor (width < 553px) {
|
||||||
.snippetBar {
|
.snippetBar {
|
||||||
|
|||||||
Reference in New Issue
Block a user