1.0.1 • Published 7 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,DANGERorNONE)position(NotificationBannerPosition, one ofBOTTOMorTOP)
License
MIT
Author
Hans Knöchel, Lambus GmbH