Skip to content

Commit

Permalink
Merge pull request #13 from SimformSolutionsPvtLtd/UNT-T4798
Browse files Browse the repository at this point in the history
UNT-T4798 - RNSB - Update bumper version.
  • Loading branch information
rupal-simform authored Mar 16, 2021
2 parents 52fbd72 + 9fea8ae commit d7c9768
Show file tree
Hide file tree
Showing 65 changed files with 10,591 additions and 11,934 deletions.
74 changes: 70 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,71 @@
node_modules
Example/node_modules

# OSX
#
.DS_Store
*.sw[po]

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Bundle artifact
*.jsbundle

# CocoaPods
/ios/Pods/
android/.project
android/.settings/org.eclipse.buildship.core.prefs
android/app/.classpath
android/app/.project
android/app/.settings/org.eclipse.buildship.core.prefs
android/java_pid28385.hprof
android/java_pid35054.hprof
android/java_pid40495.hprof
android/java_pid44292.hprof
android/java_pid50139.hprof
android/app/release/app-release.apk
android/app/release/output.json
ios/link-assets-manifest.json
6 changes: 4 additions & 2 deletions Example/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"presets": ["react-native"]
}
"plugins": [
["transform-class-properties", { "spec": true }]
]
}
17 changes: 16 additions & 1 deletion Example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ yarn-error.log
# BUCK
buck-out/
\.buckd/
*.keystore

# fastlane
#
Expand All @@ -54,3 +53,19 @@ buck-out/

# Bundle artifact
*.jsbundle

# CocoaPods
/ios/Pods/
android/.project
android/.settings/org.eclipse.buildship.core.prefs
android/app/.classpath
android/app/.project
android/app/.settings/org.eclipse.buildship.core.prefs
android/java_pid28385.hprof
android/java_pid35054.hprof
android/java_pid40495.hprof
android/java_pid44292.hprof
android/java_pid50139.hprof
android/app/release/app-release.apk
android/app/release/output.json
ios/link-assets-manifest.json
6 changes: 6 additions & 0 deletions Example/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
bracketSpacing: false,
jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'all',
};
228 changes: 29 additions & 199 deletions Example/App/App.js
Original file line number Diff line number Diff line change
@@ -1,200 +1,30 @@
import React, { Component } from 'react';
import {
ScrollView,
SafeAreaView,
Text,
View
} from 'react-native';
import React from 'react';
import { ScrollView } from 'react-native';
import styles from './styles/AppStyles';
import SpinnerButton from 'react-native-spinner-button';
// import SpinnerButton from './components/SpinnerButton';
const colors = [
'#893346',
'#1aafb8',
'#bf57c3',
'#dead00',
'#666666',
'#4CA0F7',
'#123456',
'#F87217',
];
export default class App extends Component {
constructor(props) {
super(props);
this.state = {
defaultLoading: false,
barLoading: false,
dotLoading: false,
materialLoading: false,
pacmanLoading: false,
pulseLoading: false,
skypeLoading: false,
uiAcivityLoading: false,
waveLoading: false,
};
}
render() {
return (
<SafeAreaView style={styles.safeArea}>
<ScrollView>
<View style={styles.container}>
<SpinnerButton
buttonStyle={[
styles.buttonStyle,
{ backgroundColor: colors[0] }
]}
isLoading={this.state.defaultLoading}
onPress={() => {
this.setState({ defaultLoading: true });
setTimeout(() => {
this.setState({ defaultLoading: false });
}, 3000);
}}
indicatorCount={10}
>
<Text style={styles.buttonText}>Default Or Ball SpinnerButton</Text>
</SpinnerButton>
<SpinnerButton
buttonStyle={[
styles.buttonStyle,
{ backgroundColor: colors[1] }
]}
isLoading={this.state.barLoading}
spinnerType='BarIndicator'
onPress={() => {
this.setState({ barLoading: true });
setTimeout(() => {
this.setState({ barLoading: false });
}, 3000);
}}
animationType={'flipInY'}
>
<Text style={styles.buttonText}>Bar SpinnerButton</Text>
</SpinnerButton>
<SpinnerButton
buttonStyle={[
styles.buttonStyle,
{ backgroundColor: colors[2] }
]}
isLoading={this.state.dotLoading}
indicatorCount={10}
size={10}
spinnerType='DotIndicator'
onPress={() => {
this.setState({ dotLoading: true });
setTimeout(() => {
this.setState({ dotLoading: false });
}, 3000);
}}
animationType={'flipInX'}
>
<Text style={styles.buttonText}>Dot SpinnerButton</Text>
</SpinnerButton>
<SpinnerButton
buttonStyle={[
styles.buttonStyle,
{ backgroundColor: colors[3] }
]}
isLoading={this.state.materialLoading}
spinnerType='MaterialIndicator'
onPress={() => {
this.setState({ materialLoading: true });
setTimeout(() => {
this.setState({ materialLoading: false });
}, 3000);
}}
>
<Text style={styles.buttonText}>Material SpinnerButton</Text>
</SpinnerButton>
<SpinnerButton
buttonStyle={[
styles.buttonStyle,
{ backgroundColor: colors[4] }
]}
isLoading={this.state.pacmanLoading}
spinnerType='PacmanIndicator'
onPress={() => {
this.setState({ pacmanLoading: true });
setTimeout(() => {
this.setState({ pacmanLoading: false });
}, 3000);
}}
>
<Text style={styles.buttonText}>Pacman SpinnerButton</Text>
</SpinnerButton>
<SpinnerButton
buttonStyle={[
styles.buttonStyle,
{ backgroundColor: colors[5] }
]}
isLoading={this.state.pulseLoading}
spinnerType='PulseIndicator'
onPress={() => {
this.setState({ pulseLoading: true });
setTimeout(() => {
this.setState({ pulseLoading: false });
}, 3000);
}}
>
<Text style={styles.buttonText}>Pulse SpinnerButton</Text>
</SpinnerButton>
<SpinnerButton
buttonStyle={[
styles.buttonStyle,
{ backgroundColor: colors[6] }
]}
isLoading={this.state.skypeLoading}
spinnerType='SkypeIndicator'
spinnerOptions={{
maxScale: 2
}}
onPress={() => {
this.setState({ skypeLoading: true });
setTimeout(() => {
this.setState({ skypeLoading: false });
}, 3000);
}}
>
<Text style={styles.buttonText}>Skype SpinnerButton</Text>
</SpinnerButton>
<SpinnerButton
buttonStyle={[
styles.buttonStyle,
{ backgroundColor: colors[7] }
]}
isLoading={this.state.uiAcivityLoading}
spinnerType='UIActivityIndicator'
onPress={() => {
this.setState({ uiAcivityLoading: true });
setTimeout(() => {
this.setState({ uiAcivityLoading: false });
}, 3000);
}}
>
<Text style={styles.buttonText}>UIActivity SpinnerButton</Text>
</SpinnerButton>
<SpinnerButton
buttonStyle={[
styles.buttonStyle,
{ backgroundColor: colors[8] }
]}
isLoading={this.state.waveLoading}
spinnerType='WaveIndicator'
spinnerOptions={{
waveMode: "outline"
}}
onPress={() => {
this.setState({ waveLoading: true });
setTimeout(() => {
this.setState({ waveLoading: false });
}, 3000);
}}
>
<Text style={styles.buttonText}>Wave SpinnerButton</Text>
</SpinnerButton>
</View>
</ScrollView>
</SafeAreaView>
);
}
}
import DefaultOrBallSpinnerButton from './DefaultOrBallSpinnerButton';
import BarSpinnerButton from './BarSpinnerButton';
import DotSpinnerButton from './DotSpinnerButton';
import MaterialSpinnerButton from './MaterialSpinnerButton';
import PacmanSpinnerButton from './PacmanSpinnerButton';
import PulseSpinnerButton from './PulseSpinnerButton';
import SkypeSpinnerButton from './SkypeSpinnerButton';
import UIActivitySpinnerButton from './UIActivitySpinnerButton';
import WaveSpinnerButton from './WaveSpinnerButton';

const App = () => {
return (
<ScrollView style={styles.safeArea}>
<DefaultOrBallSpinnerButton />
<BarSpinnerButton />
<DotSpinnerButton />
<MaterialSpinnerButton />
<PacmanSpinnerButton />
<PulseSpinnerButton />
<SkypeSpinnerButton />
<UIActivitySpinnerButton />
<WaveSpinnerButton />
</ScrollView>
)
};

export default App;
33 changes: 33 additions & 0 deletions Example/App/BarSpinnerButton.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { useCallback, useState } from "react";
import { Text } from 'react-native';
import styles from './styles/AppStyles';
import SpinnerButton from 'react-native-spinner-button';

const BarSpinnerButton = () => {
const [isLoading, setLoading] = useState(false);

const handleButtonPress = useCallback(() => {
setLoading(true);
setTimeout(() => {
setLoading(false);
}, 3000);
});

return (
<SpinnerButton
buttonStyle={[
styles.buttonStyle,
{ backgroundColor: '#1aafb8' }
]}
isLoading={isLoading}
spinnerType='BarIndicator'
onPress={handleButtonPress}
animationType={'flipInY'}
indicatorCount={10}
>
<Text style={styles.buttonText}>Bar SpinnerButton</Text>
</SpinnerButton>
);
};

export default BarSpinnerButton;
Loading

0 comments on commit d7c9768

Please sign in to comment.