2323npm 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';
3029import { 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
3433export 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
8275Copyright © 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