1.0.1 • Published 5 years ago

titanium-notification-banner v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

Titanium Notification Banner

A lightweight notification banner for Titanium.

Requirements

  • ES6+ enabled in the tiapp.xml (<transpile>true</transpile>)

Known Issues

  • If the notification banner is shown on a nodge-based device (e.g. iPhone X) and the container is not the window (e.g. a tab-group or navigation-window), the safe area insets should not be applied

Example

import { 
  NotificationBanner, 
  NotificationBannerType, 
  NotificationBannerPosition 
} from 'notification-banner';

new NotificationBanner({
  title: 'Titanium rocks!',
  view: yourParentView,
  type: NotificationBannerType.INFO,
  position: NotificationBannerPosition.BOTTOM
}).flash();

Methods

  • show(options)
    • options: dismissAfterDelay (milliseconds)
  • hide()
  • flash()

Properties

  • title (Required)
  • view (Required)
  • type (NotificationBannerType, one of INFO, SUCCESS, WARN, DANGER or NONE)
  • position (NotificationBannerPosition, one of BOTTOM or TOP)

License

MIT

Author

Hans Knöchel, Lambus GmbH