mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-05 10:12:41 +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(){
|
renderEditorButtons : function(){
|
||||||
if(!this.props.showEditButtons) return;
|
if(!this.props.showEditButtons) return;
|
||||||
|
|
||||||
return <div className='editors'>
|
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' : ''}`}
|
<div className={`editorTool undo ${this.props.historySize.undo ? 'active' : ''}`}
|
||||||
onClick={this.props.undo} >
|
onClick={this.props.undo} >
|
||||||
<i className='fas fa-undo' />
|
<i className='fas fa-undo' />
|
||||||
|
|||||||
@@ -46,6 +46,14 @@
|
|||||||
color : black;
|
color : black;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&.toTop{
|
||||||
|
.tooltipLeft('Back to Top');
|
||||||
|
font-size : 0.75em;
|
||||||
|
color : grey;
|
||||||
|
&.active{
|
||||||
|
color : black;
|
||||||
|
}
|
||||||
|
}
|
||||||
&.divider {
|
&.divider {
|
||||||
background: linear-gradient(#000, #000) no-repeat center/1px 100%;
|
background: linear-gradient(#000, #000) no-repeat center/1px 100%;
|
||||||
width: 5px;
|
width: 5px;
|
||||||
|
|||||||
Reference in New Issue
Block a user