File tree Expand file tree Collapse file tree 6 files changed +139
-3
lines changed
Expand file tree Collapse file tree 6 files changed +139
-3
lines changed Original file line number Diff line number Diff line change 22'use strict' ;
33
44import React from 'react' ;
5- import { View } from 'react-native' ;
5+ import { View , Platform } from 'react-native' ;
66import NativeBaseComponent from '../Base/NativeBaseComponent' ;
77import computeProps from '../../Utils/computeProps' ;
88
@@ -16,7 +16,7 @@ export default class Header extends NativeBaseComponent {
1616 flexDirection : 'row' ,
1717 alignItems : 'center' ,
1818 padding : 15 ,
19- paddingTop : 25 ,
19+ paddingTop : ( Platform . OS === 'ios' ) ? 25 : 12 ,
2020 shadowColor : '#000' ,
2121 shadowOffset : { width : 0 , height : 2 } ,
2222 shadowOpacity : 0.1 ,
Original file line number Diff line number Diff line change 1+ /* @flow */
2+ 'use strict' ;
3+
4+ import React from 'react' ;
5+ import { ActivityIndicatorIOS , Platform } from 'react-native' ;
6+ import ProgressBar from 'ProgressBarAndroid' ;
7+ import NativeBaseComponent from '../Base/NativeBaseComponent' ;
8+ import computeProps from '../../Utils/computeProps' ;
9+
10+
11+ export default class SpinnerNB extends NativeBaseComponent {
12+
13+ prepareRootProps ( ) {
14+
15+ var type = {
16+ height : 40
17+ }
18+
19+ var defaultProps = {
20+ style : type
21+ }
22+
23+ return computeProps ( this . props , defaultProps ) ;
24+
25+ }
26+
27+
28+ render ( ) {
29+ return (
30+ < ProgressBar { ...this . prepareRootProps ( ) } styleAttr = "Horizontal"
31+ indeterminate = { false } progress = { this . props . progress ? this . props . progress / 100 : 0.5 }
32+ color = { this . props . color ? this . props . color : '#41B367' } />
33+ ) ;
34+ }
35+
36+ }
37+
Original file line number Diff line number Diff line change 1+ /* @flow */
2+ 'use strict' ;
3+
4+ import React from 'react' ;
5+ import { ProgressViewIOS } from 'react-native' ;
6+ import ProgressBar from 'ProgressBarAndroid' ;
7+ import NativeBaseComponent from '../Base/NativeBaseComponent' ;
8+ import computeProps from '../../Utils/computeProps' ;
9+
10+
11+ export default class ProgressBarNB extends NativeBaseComponent {
12+
13+
14+
15+ render ( ) {
16+ return (
17+ < ProgressViewIOS progress = { this . props . progress ? this . props . progress / 100 : 0.5 }
18+ progressTintColor = { this . props . color ? this . props . color : '#FD2E1F' } />
19+ ) ;
20+ }
21+
22+ }
23+
Original file line number Diff line number Diff line change 1+ /* @flow */
2+ 'use strict' ;
3+
4+ import React from 'react' ;
5+ import { ActivityIndicatorIOS , Platform } from 'react-native' ;
6+ import ProgressBar from 'ProgressBarAndroid' ;
7+ import NativeBaseComponent from '../Base/NativeBaseComponent' ;
8+ import computeProps from '../../Utils/computeProps' ;
9+
10+
11+ export default class SpinnerNB extends NativeBaseComponent {
12+
13+ prepareRootProps ( ) {
14+
15+ var type = {
16+ height : 40
17+ }
18+
19+ var defaultProps = {
20+ style : type
21+ }
22+
23+ return computeProps ( this . props , defaultProps ) ;
24+
25+ }
26+
27+
28+ render ( ) {
29+ return (
30+ < ProgressBar { ...this . prepareRootProps ( ) } styleAttr = { this . props . size ? this . props . size : "Large" }
31+ color = { this . props . color ? this . props . color : '#41B367' } />
32+ ) ;
33+ }
34+
35+ }
36+
Original file line number Diff line number Diff line change 1+ /* @flow */
2+ 'use strict' ;
3+
4+ import React from 'react' ;
5+ import { ActivityIndicatorIOS , Platform } from 'react-native' ;
6+ import ProgressBar from 'ProgressBarAndroid' ;
7+ import NativeBaseComponent from '../Base/NativeBaseComponent' ;
8+ import computeProps from '../../Utils/computeProps' ;
9+
10+
11+ export default class SpinnerNB extends NativeBaseComponent {
12+
13+ prepareRootProps ( ) {
14+
15+ var type = {
16+ height : 80
17+ }
18+
19+ var defaultProps = {
20+ style : type
21+ }
22+
23+ return computeProps ( this . props , defaultProps ) ;
24+
25+ }
26+
27+
28+ render ( ) {
29+ return (
30+ < ActivityIndicatorIOS { ...this . prepareRootProps ( ) } color = { this . props . color ? this . props . color : '#A6A4A2' }
31+ size = { this . props . size ? this . props . size : "large" } />
32+ ) ;
33+ }
34+
35+ }
36+
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ import Thumbnail from './Components/Widgets/Thumbnail';
2525import Card from './Components/Widgets/Card' ;
2626import Badge from './Components/Widgets/Badge' ;
2727import Form from './Components/Widgets/Form' ;
28+ import Spinner from './Components/Widgets/Spinner' ;
29+ import ProgressBar from './Components/Widgets/ProgressBar' ;
2830import { Col , Row , Grid } from "react-native-easy-grid" ;
2931
3032module . exports = {
@@ -53,5 +55,7 @@ module.exports = {
5355 Thumbnail : Thumbnail ,
5456 Card : Card ,
5557 Badge : Badge ,
56- Form : Form
58+ Form : Form ,
59+ Spinner : Spinner ,
60+ ProgressBar : ProgressBar
5761} ;
You can’t perform that action at this time.
0 commit comments