1
Fork 0

Added close button functionality

This commit is contained in:
Jake Howard 2015-11-04 08:58:12 +00:00
parent 12cbdbdfd8
commit 37d84a724c
2 changed files with 11 additions and 2 deletions

View file

@ -1,14 +1,19 @@
var React = require('react');
var ipc = window.require('ipc');
var NavBar = React.createClass({
handleClose: function (evt) {
ipc.send('close');
},
render: function () {
return (
<nav id="navbar" className="navbar navbar-default navbar-fixed-top">
<div className="container-fluid">
<a className="navbar-brand">Keyboard Mechanizer</a>
<ul className="nav navbar-nav navbar-right">
<li><a href="#">Hide</a></li>
<li><a href="#"><i className="icon ion-close-round"></i></a></li>
<li><a href="#" className="no-drag">Hide</a></li>
<li><a href="#" onClick={this.handleClose}className="no-drag"><i className="icon ion-close-round"></i></a></li>
</ul>
</div>
</nav>

View file

@ -41,3 +41,7 @@ ipc.on('hide', function () {
ipc.on('show', function () {
mainWindow.show();
});
ipc.on('close', function () {
mainWindow.close();
});