Created
December 29, 2020 20:44
-
-
Save thatisuday/5c3f4b71213362891acca889d7de5f7e to your computer and use it in GitHub Desktop.
A sample JavaScript file to display notifications in an Electron app.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Notification } = require( 'electron' ); | |
// display files added notification | |
exports.filesAdded = ( size ) => { | |
const notif = new Notification( { | |
title: 'Files added', | |
body: `${ size } file(s) has been successfully added.` | |
} ); | |
notif.show(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment