cycle-native-alert
v1.1.0
Published
A Cycle.js Driver for creating Alert modals in React Native
Downloads
2
Maintainers
Readme
Cycle Native Alert
A Cycle.js Driver for creating Alert modals in React Native
npm install cycle-native-alert
Usage
Sink
Stream of command objects, to cause a React Native alert to appear. A command object has the following fields:
title
: (required) string, displays as the Alert's titlemessage
: (optional) string, displays as the Alert's textual contentbuttons
: (optional) array of objects, describes each button in the Alerttext
: (required) string, as the button's labelid
: (required) string, to uniquely identify this buttonstyle
: (optional) string, either 'default' or 'cancel' or 'destructive'
options
: (optional) object with fieldcancelable
booleantype
: (optional)
Source
Stream of button ids (strings) to indicate which button id was pressed.
License
Copyright (C) 2018 Andre 'Staltz' Medeiros, licensed under MIT license