Skip to content
On this page

@bridge/notifications

Module that allows extensions to create notifications.

Functions

create

create(config): any

Create a new notification.

example

const { create } = await require('@bridge/notification')

create(
      icon: 'mdi-apple',
      message: 'Hello World!',
      color: 'blue'
      textColor: 'white',
      disposeOnMiddleClick: true,

      () => {
   	   // Do something...
      },
      () => {
   	   // Do something...
      }
)

Parameters

NameType
configINotificationConfig

Returns

any


createError

createError(error): IDisposable

Create a new error notification.

example

const { createError } = await require('@bridge/notification')

createError(new Error(`Oops, something went wrong :(`))

try {
	   const t = 0
	   t = 2 //Throws error
} catch (error) {
	   createError(error)
}

Parameters

NameType
errorError

Returns

IDisposable

Released under the GPL-3.0 License.