Skip to content

Commit 941db56

Browse files
committed
readme and example updated
1 parent 14acee1 commit 941db56

2 files changed

Lines changed: 58 additions & 5 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ ignite add progress
99
An [ignite plugin](https://github.com/infinitered/ignite) for [react-native-progress](https://github.com/oblador/react-native-progress).
1010

1111
More information on `react-native-progress` can be found [here!](https://github.com/oblador/react-native-progress)
12+
13+
14+
### Screenshot
15+
![ignite-progress screenshot](https://user-images.githubusercontent.com/81311/32766372-423b8400-c941-11e7-8604-a53373524e93.png)

templates/ProgressExample.js.ejs

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,59 @@
1-
import React from 'react'
2-
import { View, Text } from 'react-native'
1+
import React, { Component } from 'react'
2+
import { View, Text, StyleSheet } from 'react-native'
33
import ExamplesRegistry from '../../../App/Services/ExamplesRegistry'
4+
import * as Progress from 'react-native-progress';
5+
6+
const styles = StyleSheet.create({
7+
container: {
8+
flex: 1,
9+
justifyContent: 'center',
10+
alignItems: 'center',
11+
paddingVertical: 20,
12+
},
13+
circles: {
14+
flexDirection: 'row',
15+
alignItems: 'center',
16+
},
17+
progress: {
18+
margin: 10,
19+
},
20+
});
21+
22+
export default class ProgressExample extends Component {
23+
constructor(props) {
24+
super(props);
25+
26+
this.state = {
27+
indeterminate: true,
28+
};
29+
}
30+
31+
render() {
32+
return (
33+
<View style={styles.container}>
34+
<Progress.Bar
35+
style={styles.progress}
36+
indeterminate
37+
/>
38+
<View style={styles.circles}>
39+
<Progress.CircleSnail
40+
style={styles.progress}
41+
/>
42+
<Progress.CircleSnail
43+
style={styles.progress}
44+
color={[
45+
'#F44336',
46+
'#2196F3',
47+
'#009688',
48+
]}
49+
/>
50+
</View>
51+
</View>
52+
);
53+
}
54+
}
455

556
// Example
657
ExamplesRegistry.addPluginExample('Progress', () =>
7-
<View>
8-
{/* Add your component or plugin example here */}
9-
</View>
58+
<ProgressExample/>
1059
)

0 commit comments

Comments
 (0)