From 19b356aaea2b936696c96fc9a4fec8ecd175bd68 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Tue, 8 May 2018 13:27:11 -0700 Subject: [PATCH] [add] Alert API --- .../babel-plugin-react-native-web/src/moduleMap.js | 1 + .../react-native-web/src/exports/Alert/index.js | 14 ++++++++++++++ packages/react-native-web/src/index.js | 3 +++ 3 files changed, 18 insertions(+) create mode 100644 packages/react-native-web/src/exports/Alert/index.js diff --git a/packages/babel-plugin-react-native-web/src/moduleMap.js b/packages/babel-plugin-react-native-web/src/moduleMap.js index 3bd6bf92..edba8bf4 100644 --- a/packages/babel-plugin-react-native-web/src/moduleMap.js +++ b/packages/babel-plugin-react-native-web/src/moduleMap.js @@ -3,6 +3,7 @@ module.exports = { ART: true, AccessibilityInfo: true, ActivityIndicator: true, + Alert: true, Animated: true, AppRegistry: true, AppState: true, diff --git a/packages/react-native-web/src/exports/Alert/index.js b/packages/react-native-web/src/exports/Alert/index.js new file mode 100644 index 00000000..21582e6b --- /dev/null +++ b/packages/react-native-web/src/exports/Alert/index.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Nicolas Gallagher. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +class Alert { + static alert() {} +} + +export default Alert; diff --git a/packages/react-native-web/src/index.js b/packages/react-native-web/src/index.js index 8f44ddb7..bb0c835d 100644 --- a/packages/react-native-web/src/index.js +++ b/packages/react-native-web/src/index.js @@ -9,6 +9,7 @@ import ViewPropTypes from './exports/ViewPropTypes'; // APIs import AccessibilityInfo from './exports/AccessibilityInfo'; +import Alert from './exports/Alert'; import Animated from './exports/Animated'; import AppRegistry from './exports/AppRegistry'; import AppState from './exports/AppState'; @@ -80,6 +81,7 @@ export { ViewPropTypes, // APIs AccessibilityInfo, + Alert, Animated, AppRegistry, AppState, @@ -150,6 +152,7 @@ const ReactNative = { ViewPropTypes, // APIs AccessibilityInfo, + Alert, Animated, AppRegistry, AppState,