mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 20:42:43 +00:00
Add toTop button to SnippetBar
This commit is contained in:
@@ -60,10 +60,19 @@ const Snippetbar = createClass({
|
||||
});
|
||||
},
|
||||
|
||||
toTop : function(){
|
||||
this.props.brewJump(1);
|
||||
this.props.sourceJump(1);
|
||||
},
|
||||
|
||||
renderEditorButtons : function(){
|
||||
if(!this.props.showEditButtons) return;
|
||||
|
||||
return <div className='editors'>
|
||||
<div className={`editorTool toTop ${this.props.view != 'meta' ? 'active' : ''}`}
|
||||
onClick={this.toTop} >
|
||||
<i className='fas fa-arrow-up' />
|
||||
</div>
|
||||
<div className={`editorTool undo ${this.props.historySize.undo ? 'active' : ''}`}
|
||||
onClick={this.props.undo} >
|
||||
<i className='fas fa-undo' />
|
||||
|
||||
@@ -46,6 +46,14 @@
|
||||
color : black;
|
||||
}
|
||||
}
|
||||
&.toTop{
|
||||
.tooltipLeft('Back to Top');
|
||||
font-size : 0.75em;
|
||||
color : grey;
|
||||
&.active{
|
||||
color : black;
|
||||
}
|
||||
}
|
||||
&.divider {
|
||||
background: linear-gradient(#000, #000) no-repeat center/1px 100%;
|
||||
width: 5px;
|
||||
|
||||
Reference in New Issue
Block a user