electron-react-titlebar
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -22,3 +22,3 @@ 'use strict'; | ||
const TitleBar = exports.TitleBar = ({ icon, menu, disableMinimize, disableMaximize, className }) => _react2.default.createElement( | ||
const TitleBar = exports.TitleBar = ({ children, icon, menu, disableMinimize, disableMaximize, className }) => _react2.default.createElement( | ||
'div', | ||
@@ -30,2 +30,3 @@ { id: 'electron-app-title-bar', className: `electron-app-title-bar ${className || ''}` }, | ||
_react2.default.createElement(_menu.MenuBar, { menu: menu }), | ||
children, | ||
_react2.default.createElement(_windowControls.WindowControls, { disableMinimize: disableMinimize, disableMaximize: disableMaximize }) | ||
@@ -35,2 +36,3 @@ ); | ||
TitleBar.propTypes = { | ||
children: _propTypes2.default.node, | ||
icon: _propTypes2.default.string, | ||
@@ -37,0 +39,0 @@ disableMinimize: _propTypes2.default.bool, |
{ | ||
"name": "electron-react-titlebar", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "A github desktop style title bar component for electron.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -34,2 +34,6 @@ # electron-react-titlebar | ||
#### children | ||
Elements to be rendered in between the menu and the window controls (optional). | ||
#### disableMinimize | ||
@@ -36,0 +40,0 @@ |
@@ -7,3 +7,3 @@ import React from 'react' | ||
export const TitleBar = ({ icon, menu, disableMinimize, disableMaximize, className }) => ( | ||
export const TitleBar = ({ children, icon, menu, disableMinimize, disableMaximize, className }) => ( | ||
<div id="electron-app-title-bar" className={`electron-app-title-bar ${className || ''}`}> | ||
@@ -14,2 +14,3 @@ <div className="resize-handle resize-handle-top" /> | ||
<MenuBar menu={menu} /> | ||
{children} | ||
<WindowControls disableMinimize={disableMinimize} disableMaximize={disableMaximize} /> | ||
@@ -20,2 +21,3 @@ </div> | ||
TitleBar.propTypes = { | ||
children: PropTypes.node, | ||
icon: PropTypes.string, | ||
@@ -22,0 +24,0 @@ disableMinimize: PropTypes.bool, |
98622
1318
64
21