Skip to content

Commit c462aa0

Browse files
authored
fix: unimplemented view export (#328)
1 parent 0652d49 commit c462aa0

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

js/UnimplementedView.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ const styles = StyleSheet.create({
3535
: {},
3636
});
3737

38-
module.exports = UnimplementedView;
38+
export default UnimplementedView;

js/UnimplementedView.web.js

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @flow
8+
* @format
9+
*/
10+
11+
'use strict';
12+
13+
import * as React from 'react';
14+
import {View, StyleSheet} from 'react-native';
15+
declare var __DEV__: boolean;
16+
/**
17+
* Common implementation for a simple stubbed view. Simply applies the view's styles to the inner
18+
* View component and renders its children.
19+
*/
20+
const UnimplementedView = (props: $FlowFixMeProps): React.Node => {
21+
return (
22+
<View style={[styles.unimplementedView, props.style]}>
23+
{props.children}
24+
</View>
25+
);
26+
};
27+
28+
const styles = StyleSheet.create({
29+
unimplementedView:
30+
process.env.NODE_ENV !== 'production'
31+
? {
32+
alignSelf: 'flex-start',
33+
borderColor: 'red',
34+
borderWidth: 1,
35+
}
36+
: {},
37+
});
38+
39+
export default UnimplementedView;

0 commit comments

Comments
 (0)