import { Tray } from '@empathize/framework';
const tray = new Tray('path_to/my_icon.png', [
{ text: 'Example text', disabled: true },
{
text: 'Example button',
click: (item) => {
console.log(`Hey! You just clicked "${item.text}"!`);
}
}
]);
import { Tray } from '@empathize/framework';
const tray = new Tray('path_to/my_icon.png', [
{ text: 'Example text 1', disabled: true },
{ text: 'Example text 2', disabled: true }
]);
for (const item of tray.items)
console.log(item.text);
import { Tray } from '@empathize/framework';
const tray = new Tray('path_to/my_icon.png');
tray.items = [
{ text: 'Example text 1', disabled: true },
{ text: 'Example text 2', disabled: true }
];
import { Tray } from '@empathize/framework';
const tray = new Tray('path_to/my_icon.png', [
{ text: 'Example text', disabled: true }
]);
// Update already existing tray
tray.update();
// Specify new items and update already existing tray
tray.update([
{ text: 'Updated example text', disabled: true }
]);
import { Tray } from '@empathize/framework';
const tray = new Tray('path_to/my_icon.png', [
{ text: 'Example text', disabled: true }
]);
// Hide tray items (tray itself can't be hidden while application is running)
tray.hide();