├── ReactNativeStatusBarAlertExample ├── .watchmanconfig ├── .gitignore ├── app.json ├── .babelrc ├── App.test.js ├── package.json ├── .flowconfig ├── App.js └── README.md ├── .npmignore ├── .gitignore ├── screenshots ├── react-native-statusbar-alert.mov.gif ├── react-native-statusbar-alert-press.mov.gif └── react-native-statusbar-alert-pulse.mov.gif ├── package.json ├── README.md └── index.js /ReactNativeStatusBarAlertExample/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | screenshots 2 | ReactNativeStatusBarAlertExample 3 | -------------------------------------------------------------------------------- /ReactNativeStatusBarAlertExample/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .expo/ 3 | npm-debug.* 4 | -------------------------------------------------------------------------------- /ReactNativeStatusBarAlertExample/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "sdkVersion": "21.0.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ReactNativeStatusBarAlertExample/node_modules 2 | ReactNativeStatusBarAlertExample/.expo/** 3 | ReactNativeStatusBarAlertExample/npm-debug.* 4 | -------------------------------------------------------------------------------- /screenshots/react-native-statusbar-alert.mov.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gnestor/react-native-statusbar-alert/HEAD/screenshots/react-native-statusbar-alert.mov.gif -------------------------------------------------------------------------------- /screenshots/react-native-statusbar-alert-press.mov.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gnestor/react-native-statusbar-alert/HEAD/screenshots/react-native-statusbar-alert-press.mov.gif -------------------------------------------------------------------------------- /screenshots/react-native-statusbar-alert-pulse.mov.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gnestor/react-native-statusbar-alert/HEAD/screenshots/react-native-statusbar-alert-pulse.mov.gif -------------------------------------------------------------------------------- /ReactNativeStatusBarAlertExample/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["babel-preset-expo"], 3 | "env": { 4 | "development": { 5 | "plugins": ["transform-react-jsx-source"] 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ReactNativeStatusBarAlertExample/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import App from './App'; 3 | 4 | import renderer from 'react-test-renderer'; 5 | 6 | it('renders without crashing', () => { 7 | const rendered = renderer.create().toJSON(); 8 | expect(rendered).toBeTruthy(); 9 | }); 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-statusbar-alert", 3 | "version": "0.4.0", 4 | "description": "A status bar alert (e.g. in-call, recording, navigating) for React Native", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/gnestor/react-native-statusbar-alert" 12 | }, 13 | "keywords": [ 14 | "react native", 15 | "status bar", 16 | "alert", 17 | "banner" 18 | ], 19 | "author": "Grant Nestor (grantnestor@gmail.com)", 20 | "license": "ISC", 21 | "bugs": { 22 | "url": "https://github.com/gnestor/react-native-statusbar-alert/issues" 23 | }, 24 | "homepage": "https://github.com/gnestor/react-native-statusbar-alert", 25 | "peerDependencies": { 26 | "react": "^16.0.0", 27 | "react-native": ">=0.26", 28 | "prop-types": "^15" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ReactNativeStatusBarAlertExample/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ReactNativeStatusBarAlertExample", 3 | "version": "0.1.0", 4 | "private": true, 5 | "devDependencies": { 6 | "jest-expo": "^21.0.2", 7 | "react-devtools": "^2.5.2", 8 | "react-native-scripts": "1.5.0", 9 | "react-test-renderer": "16.0.0-alpha.12" 10 | }, 11 | "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js", 12 | "scripts": { 13 | "start": "react-native-scripts start", 14 | "eject": "react-native-scripts eject", 15 | "android": "react-native-scripts android", 16 | "ios": "react-native-scripts ios", 17 | "test": "node node_modules/jest/bin/jest.js --watch" 18 | }, 19 | "jest": { 20 | "preset": "jest-expo" 21 | }, 22 | "dependencies": { 23 | "expo": "^21.0.0", 24 | "prop-types": "^15.6.0", 25 | "react": "16.0.0-alpha.12", 26 | "react-native": "^0.48.4", 27 | "react-native-statusbar-alert": "^0.2.0", 28 | "react-navigation": "^1.0.0-beta.13" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ReactNativeStatusBarAlertExample/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | .*/Libraries/react-native/ReactNative.js 16 | 17 | ; Additional create-react-native-app ignores 18 | 19 | ; Ignore duplicate module providers 20 | .*/node_modules/fbemitter/lib/* 21 | 22 | ; Ignore misbehaving dev-dependencies 23 | .*/node_modules/xdl/build/* 24 | .*/node_modules/reqwest/tests/* 25 | 26 | ; Ignore missing expo-sdk dependencies (temporarily) 27 | ; https://github.com/expo/expo/issues/162 28 | .*/node_modules/expo/src/* 29 | 30 | ; Ignore react-native-fbads dependency of the expo sdk 31 | .*/node_modules/react-native-fbads/* 32 | 33 | [include] 34 | 35 | [libs] 36 | node_modules/react-native/Libraries/react-native/react-native-interface.js 37 | node_modules/react-native/flow 38 | flow/ 39 | 40 | [options] 41 | module.system=haste 42 | 43 | emoji=true 44 | 45 | experimental.strict_type_args=true 46 | 47 | munge_underscores=true 48 | 49 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 50 | 51 | suppress_type=$FlowIssue 52 | suppress_type=$FlowFixMe 53 | suppress_type=$FixMe 54 | 55 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 56 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 57 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 58 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 59 | 60 | unsafe.enable_getters_and_setters=true 61 | 62 | [version] 63 | ^0.49.1 64 | -------------------------------------------------------------------------------- /ReactNativeStatusBarAlertExample/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | Button, 4 | Image, 5 | StatusBar, 6 | StyleSheet, 7 | Text, 8 | View 9 | } from 'react-native'; 10 | import { StackNavigator } from 'react-navigation'; 11 | import PropTypes from 'prop-types'; 12 | import StatusBarAlert from 'react-native-statusbar-alert'; 13 | 14 | export class HomeScreen extends React.Component { 15 | static navigationOptions = { 16 | title: 'Home View' 17 | }; 18 | static contextTypes = { 19 | toggleAlert: PropTypes.func 20 | }; 21 | render() { 22 | const { navigate } = this.props.navigation; 23 | return ( 24 | 25 | react-native-statusbar-alert + react-navigation example app 26 |