Skip to content

Commit f332217

Browse files
authored
Try on Expo Snack Added
1 parent 2226769 commit f332217

File tree

1 file changed

+24
-31
lines changed

1 file changed

+24
-31
lines changed

README.md

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,42 +23,35 @@
2323
npm i @mrakesh0608/react-native-loading-dots
2424
```
2525
## Usage
26+
[Try on Expo Snack](https://snack.expo.dev/@mrakesh0608/react-native-loading-dots-)
2627
```
27-
import 'react-native-gesture-handler';
28-
29-
import { View, Text } from 'react-native';
28+
import { View, Text, ScrollView } from 'react-native';
3029
import { LoadingDots } from '@mrakesh0608/react-native-loading-dots';
3130
32-
const list = ["elastic", "flashing", "typing", "ping", 'pulse']
31+
const list = ['elastic', 'flashing', 'typing', 'ping', 'pulse'];
3332
3433
export default function App() {
35-
return (
36-
<View style={{ justifyContent: 'center', flex: 1 }}>
37-
<View style={{
38-
alignItems: 'center',
39-
justifyContent: 'center',
40-
flexDirection: 'row',
41-
flexWrap: 'wrap'
42-
}}>
43-
44-
{list.map((item, index) =>
45-
<View key={index}>
46-
<LoadingDots
47-
animation={item}
48-
containerStyle={{
49-
marginHorizontal: 80,
50-
marginVertical: 5,
51-
backgroundColor: 'lightgray',
52-
padding: 18,
53-
borderRadius: 10,
54-
}}
55-
/>
56-
<Text style={{ textAlign: 'center' }}>{item}</Text>
57-
</View>
58-
)}
59-
</View>
34+
return (
35+
<ScrollView style={{ justifyContent: 'center', alignItems: 'center' }}>
36+
{list.map((item, index) => (
37+
<View
38+
key={index}
39+
style={{
40+
marginVertical: 12,
41+
}}>
42+
<LoadingDots
43+
animation={item}
44+
containerStyle={{
45+
backgroundColor: 'lightgray',
46+
padding: 18,
47+
borderRadius: 10,
48+
}}
49+
/>
50+
<Text style={{ textAlign: 'center' }}>{item}</Text>
6051
</View>
61-
);
52+
))}
53+
</ScrollView>
54+
);
6255
}
6356
```
6457

@@ -80,4 +73,4 @@ Give a ⭐️ if this project helped you!
8073

8174
## 📝 License
8275
Copyright © 2023 [Merugu Rakesh](https://github.com/mrakesh0608).<br />
83-
This project is [MIT](https://github.com/mrakesh0608/react-native-loading-dots/blob/master/LICENSE) licensed.
76+
This project is [MIT](https://github.com/mrakesh0608/react-native-loading-dots/blob/master/LICENSE) licensed.

0 commit comments

Comments
 (0)