react-windows-controls
react-windows-controls copied to clipboard
Windows title bar control buttons for React
react-windows-controls
Windows 10 title bar control buttons for React.
Installation
To install this package, just run
$ npm install react-windows-controls
Quick example

import { remote } from 'electron';
import { WindowsControls } from 'react-windows-controls';
export default () => (
<WindowsControls isMaximized={remote.getCurrentWindow().isMaximized()} />
);
Components
<WindowsControls />
darkboolean - whether to invert icons colorsonCloseFunction - on close button click eventisMaximizedboolean - whether to show the restore buttononMaximizeFunction - on maximize button click eventonMinimizeFunction - on minimize button click eventonMouseUpFunctiononMouseDownFunctionstyleany
<WindowsControl />
maximizeboolean - whether the button is a maximize buttoncloseboolean - whether the button is a close buttonminimizeboolean - whether the button is a minimize buttonrestoreboolean - whether the button is a restore buttonwhiteIconboolean - whether to invert icon coloronClickFunctiononMouseUpFunctiononMouseDownFunctionstyleany