1.0.1 • Published 5 years ago
titanium-notification-banner v1.0.1
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 ofINFO
,SUCCESS
,WARN
,DANGER
orNONE
)position
(NotificationBannerPosition
, one ofBOTTOM
orTOP
)
License
MIT
Author
Hans Knöchel, Lambus GmbH