Skip to content

Commit 56a9dda

Browse files
Sankhadeep RoySankhadeep Roy
authored andcommitted
spinner yet again :)
1 parent 9f78564 commit 56a9dda

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

Components/Widgets/Spinner.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/* @flow */
2+
'use strict';
3+
4+
import React from 'react';
5+
import { ActivityIndicator } from 'react-native';
6+
import NativeBaseComponent from '../Base/NativeBaseComponent';
7+
import computeProps from '../../Utils/computeProps';
8+
9+
10+
export default class SpinnerNB extends NativeBaseComponent {
11+
12+
prepareRootProps() {
13+
14+
var type = {
15+
height: 80
16+
}
17+
18+
var defaultProps = {
19+
style: type
20+
}
21+
22+
return computeProps(this.props, defaultProps);
23+
24+
}
25+
26+
27+
render() {
28+
return(
29+
<ActivityIndicator {...this.prepareRootProps()} color={this.props.color ? this.props.color : this.props.inverse ?
30+
this.getTheme().inverseSpinnerColor :
31+
this.getTheme().defaultSpinnerColor}
32+
size={this.props.size ? this.props.size : "large" } />
33+
);
34+
}
35+
36+
}

0 commit comments

Comments
 (0)