Skip to content

Commit c0f33b9

Browse files
authored
Regenerate example app (#303)
1 parent c0b9a6e commit c0f33b9

File tree

78 files changed

+10625
-4490
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+10625
-4490
lines changed

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
examples
1+
example
22

33
# Assets
44
docs

README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ A component for UIVisualEffectView's blur and vibrancy effect on iOS, and [500px
1616

1717
### Installation
1818

19-
**NOTE:** Latest version of the package is available in npm as `[email protected]`
20-
2119
1. Install package via npm:
2220

2321
```
@@ -34,7 +32,7 @@ react-native link react-native-blur
3432

3533
```
3634
android {
37-
// make sure to use 23.0.3 instead of 23.0.1
35+
// make sure to use 23.0.3 or greater
3836
buildToolsVersion '23.0.3'
3937
4038
// ...
@@ -50,10 +48,6 @@ android {
5048

5149
```javascript
5250
import { BlurView, VibrancyView } from "react-native-blur";
53-
54-
// OR
55-
56-
const { BlurView, VibrancyView } = require("react-native-blur");
5751
```
5852

5953
5. Compile and have fun!
@@ -186,10 +180,10 @@ cd ~
186180
git clone https://github.com/react-native-community/react-native-blur.git
187181
```
188182

189-
2. cd to `examples/Basic`
183+
2. cd to `example`
190184

191185
```
192-
cd react-native-blur/examples/Basic
186+
cd react-native-blur/example
193187
```
194188

195189
3. Install dependencies

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ repositories {
3737
}
3838

3939
dependencies {
40-
compile 'com.facebook.react:react-native:[0.32,)'
40+
implementation 'com.facebook.react:react-native:+'
4141
}
File renamed without changes.

example/.flowconfig

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
[ignore]
2+
; We fork some components by platform
3+
.*/*[.]android.js
4+
5+
; Ignore "BUCK" generated dirs
6+
<PROJECT_ROOT>/\.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+
16+
; Ignore polyfills
17+
.*/Libraries/polyfills/.*
18+
19+
; Ignore metro
20+
.*/node_modules/metro/.*
21+
22+
[include]
23+
24+
[libs]
25+
node_modules/react-native/Libraries/react-native/react-native-interface.js
26+
node_modules/react-native/flow/
27+
28+
[options]
29+
emoji=true
30+
31+
esproposal.optional_chaining=enable
32+
esproposal.nullish_coalescing=enable
33+
34+
module.system=haste
35+
module.system.haste.use_name_reducers=true
36+
# get basename
37+
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
38+
# strip .js or .js.flow suffix
39+
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
40+
# strip .ios suffix
41+
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
42+
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
43+
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
44+
module.system.haste.paths.blacklist=.*/__tests__/.*
45+
module.system.haste.paths.blacklist=.*/__mocks__/.*
46+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
47+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
48+
49+
munge_underscores=true
50+
51+
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'
52+
53+
module.file_ext=.js
54+
module.file_ext=.jsx
55+
module.file_ext=.json
56+
module.file_ext=.native.js
57+
58+
suppress_type=$FlowIssue
59+
suppress_type=$FlowFixMe
60+
suppress_type=$FlowFixMeProps
61+
suppress_type=$FlowFixMeState
62+
63+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
64+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
65+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
66+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
67+
68+
[version]
69+
^0.92.0
File renamed without changes.

examples/Basic/.gitignore renamed to example/.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,11 @@ buck-out/
4646
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
4747
# screenshots whenever they are needed.
4848
# For more information about the recommended setup visit:
49-
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
49+
# https://docs.fastlane.tools/best-practices/source-control/
5050

51-
fastlane/report.xml
52-
fastlane/Preview.html
53-
fastlane/screenshots
51+
*/fastlane/report.xml
52+
*/fastlane/Preview.html
53+
*/fastlane/screenshots
54+
55+
# Bundle artifact
56+
*.jsbundle
File renamed without changes.

examples/Basic/index.android.js renamed to example/App.android.js

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,24 @@
22
* Basic [Android] Example for react-native-blur
33
* https://github.com/react-native-community/react-native-blur
44
*/
5-
'use strict';
65
import React, { Component } from 'react';
76
import {
8-
AppRegistry,
7+
Dimensions,
98
Image,
10-
findNodeHandle,
9+
InteractionManager,
1110
StyleSheet,
11+
Switch,
1212
Text,
1313
View,
14-
Dimensions,
15-
Switch,
16-
InteractionManager,
14+
findNodeHandle,
1715
} from 'react-native';
18-
import AndroidSegmented from 'react-native-segmented-android';
16+
import SegmentedControlTab from 'react-native-segmented-control-tab';
1917

2018
import { BlurView } from 'react-native-blur';
2119

2220
const BLUR_TYPES = ['xlight', 'light', 'dark'];
2321

24-
class Basic extends Component {
22+
export default class Basic extends Component {
2523
constructor() {
2624
super();
2725
this.state = {
@@ -72,18 +70,18 @@ class Basic extends Component {
7270
Blur component (Android)
7371
</Text>
7472

75-
<AndroidSegmented
73+
<SegmentedControlTab
7674
tintColor={tintColor}
7775
style={{
7876
width: Dimensions.get('window').width,
7977
height: 28,
8078
justifyContent: 'center',
8179
alignItems: 'center',
8280
}}
83-
childText={BLUR_TYPES}
81+
values={BLUR_TYPES}
8482
orientation="horizontal"
85-
selectedPosition={this.state.activeSegment}
86-
onChange={this._onChange.bind(this)} />
83+
selectedIndex={this.state.activeSegment}
84+
onTabPress={this._onChange.bind(this)} />
8785

8886
</View>
8987
);
@@ -148,5 +146,3 @@ const styles = StyleSheet.create({
148146
alignItems: 'flex-end',
149147
},
150148
});
151-
152-
AppRegistry.registerComponent('Basic', () => Basic);

examples/Basic/index.ios.js renamed to example/App.ios.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@
44
*/
55
import React, { Component } from 'react';
66
import {
7-
AppRegistry,
8-
StyleSheet,
9-
Text,
107
Image,
11-
View,
128
SegmentedControlIOS,
9+
StyleSheet,
1310
Switch,
11+
Text,
12+
View,
1413
} from 'react-native';
1514

1615
import { BlurView, VibrancyView } from 'react-native-blur';
1716

18-
class Basic extends Component {
17+
export default class Basic extends Component {
1918
constructor(props) {
2019
super(props);
2120

@@ -165,5 +164,3 @@ const styles = StyleSheet.create({
165164
alignItems: 'flex-end',
166165
},
167166
});
168-
169-
AppRegistry.registerComponent('Basic', () => Basic);

0 commit comments

Comments
 (0)