react-native-alert-notification
Version:
Toast notification and dialog box notification for react native
73 lines (67 loc) • 2.12 kB
JavaScript
import { Dimensions } from 'react-native';
const WINDOWS = Dimensions.get('window');
const WIDTH = WINDOWS.width;
const HEIGHT = WINDOWS.height;
var ACTION;
(function (ACTION) {
ACTION[ACTION["OPEN"] = 0] = "OPEN";
ACTION[ACTION["CLOSE"] = 1] = "CLOSE";
})(ACTION || (ACTION = {}));
var ALERT_TYPE;
(function (ALERT_TYPE) {
ALERT_TYPE["SUCCESS"] = "SUCCESS";
ALERT_TYPE["DANGER"] = "DANGER";
ALERT_TYPE["WARNING"] = "WARNING";
ALERT_TYPE["INFO"] = "INFO";
})(ALERT_TYPE || (ALERT_TYPE = {}));
var TOAST_POSITION;
(function (TOAST_POSITION) {
TOAST_POSITION["TOP"] = "TOP";
TOAST_POSITION["BOTTOM"] = "BOTTOM";
})(TOAST_POSITION || (TOAST_POSITION = {}));
const ENV = {
AUTO_CLOSE: 5000,
WINDOWS: {
WIDTH,
HEIGHT
},
COLORS: {
label: {
ios: 'label',
android: ['@android:color/primary_text_light', '@android:color/primary_text_dark'],
default: ['rgb(229,229,231)', 'rgb(32,32,35)']
},
card: {
ios: 'systemGray6',
android: ['@android:color/background_light', '@android:color/background_dark'],
default: ['rgb(216,216,220)', 'rgb(54,54,56)']
},
overlay: {
ios: 'black',
android: ['@android:color/background_dark', '@android:color/background_dark'],
default: ['#000000', '#000000']
},
success: {
ios: 'systemGreen',
android: ['@android:color/holo_green_light', '@android:color/holo_green_dark'],
default: ['rgb(52,199,85)', 'rgb(48,209,88)']
},
danger: {
ios: 'systemRed',
android: ['@android:color/holo_red_light', '@android:color/holo_red_dark'],
default: ['rgb(255,59,48)', 'rgb(255,69,58)']
},
warning: {
ios: 'systemOrange',
android: ['@android:color/holo_orange_light', '@android:color/holo_orange_dark'],
default: ['rgb(255,149,0)', 'rgb(255,159,10)']
},
info: {
ios: 'systemBlue',
android: ['@android:color/holo_blue_light', '@android:color/holo_blue_dark'],
default: ['rgb(80,122,189)', 'rgb(80,122,190)']
}
}
};
export { ENV, ALERT_TYPE, TOAST_POSITION, ACTION };
//# sourceMappingURL=ENV.js.map