0.3.2 • Published 6 years ago
electron-badge v0.3.2
electron-badge
Electron badge works well for Windows
Installation
$ yarn add electron-badge
Usage
// main.js
const Badge = require('electron-badge');
function createWindow() {
win = new BrowserWindow({width: 800, height: 600});
const badgeOptions = {};
new Badge(win, badgeOptions);
}
// index.html
ipcRenderer.send('update-badge', 5, {background: 'crimson'});
// To remove badge
ipcRenderer.send('update-badge', 0); // or null
API
Badge options(Windows only)
Option Name | Default Value |
---|---|
color | white |
backaground | red |
fontSize | 12px |
fontFamily | Arial |
fontWeight | bold |
max | 99 |
License
MIT © Nghiep