Alert

The Alert protocol:

protocol Alert {
  func modal(_ title: String, _ message: String)
 
  func info(_ title: String, _ message: String)
 
  func success(_ title: String, _ message: String)
 
  func warn(_ title: String, _ message: String)
 
  func error(_ title: String, _ message: String)
}

$alert.modal

$alert.modal('Title', 'Message');

Show the stardard macOS alert that requires manual dismissal by clicking the OK button.

$alert.info

$alert.info('Title', 'Message');

Show an info style alert at the center of your screen. The alert will be automatically hidden after 4 seconds.

$alert.success

$alert.success('Title', 'Message');

Show a success style alert at the center of your screen. The alert will be automatically hidden after 4 seconds.

$alert.warn

$alert.warn('Title', 'Message');

Show a warning style alert at the center of your screen. The alert will be automatically hidden after 4 seconds.

$alert.error

$alert.error('Title', 'Message');

Show an error style alert at the center of your screen. The alert will be automatically hidden after 4 seconds.