0
0
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:
G.Ambatte
2022-05-03 13:36:27 +12:00
parent f6db66b28c
commit 010309b04f
2 changed files with 17 additions and 0 deletions

View File

@@ -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' />

View File

@@ -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;