Skip to content

Commit 82fce71

Browse files
committed
feat: [:fire:] remove unused files
1 parent 18fbe39 commit 82fce71

File tree

2 files changed

+227
-133
lines changed

2 files changed

+227
-133
lines changed

examples/App.js

Lines changed: 0 additions & 133 deletions
This file was deleted.

examples/src/App.js

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
*
5+
* @format
6+
*/
7+
8+
import React, { useState } from 'react';
9+
import { View, Text, StatusBar, Button } from 'react-native';
10+
11+
import PaginationDot from 'react-native-animated-pagination-dot';
12+
13+
const TestDotContainer = ({ color, sizeRatio = 1.0, maxPage = 10 }) => {
14+
const [page, setPage] = useState(0);
15+
16+
return (
17+
<View
18+
style={{
19+
flex: 1,
20+
borderBottomWidth: 0.5,
21+
borderBottomColor: 'grey',
22+
marginBottom: 10,
23+
}}
24+
>
25+
<View style={{ flex: 1, flexDirection: 'row' }}>
26+
<View
27+
style={{
28+
flex: 1,
29+
justifyContent: 'space-between',
30+
flexDirection: 'row',
31+
alignItems: 'center',
32+
marginRight: 12,
33+
}}
34+
>
35+
<Text style={{ fontSize: 16, fontWeight: '400', color: 'black' }}>
36+
page
37+
</Text>
38+
<Text style={{ fontSize: 16, fontWeight: '600', color: 'grey' }}>
39+
{page + 1} / {maxPage}
40+
</Text>
41+
</View>
42+
<View
43+
style={{
44+
flex: 1,
45+
justifyContent: 'space-between',
46+
flexDirection: 'row',
47+
alignItems: 'center',
48+
marginRight: 12,
49+
}}
50+
>
51+
<Text style={{ fontSize: 16, fontWeight: '400', color: 'black' }}>
52+
sizeRatio
53+
</Text>
54+
<Text style={{ fontSize: 16, fontWeight: '600', color: 'grey' }}>
55+
{sizeRatio}
56+
</Text>
57+
</View>
58+
</View>
59+
60+
<View
61+
style={{
62+
flex: 2,
63+
justifyContent: 'space-between',
64+
flexDirection: 'row',
65+
alignItems: 'center',
66+
}}
67+
>
68+
<Button
69+
title="Prev"
70+
onPress={() => {
71+
setPage(page - 1);
72+
}}
73+
/>
74+
75+
<PaginationDot
76+
activeDotColor={color}
77+
curPage={page}
78+
maxPage={maxPage}
79+
sizeRatio={sizeRatio}
80+
/>
81+
82+
<Button
83+
title="Next"
84+
onPress={() => {
85+
setPage(page + 1);
86+
}}
87+
/>
88+
</View>
89+
</View>
90+
);
91+
};
92+
93+
const TestDotVerticalContainer = ({ color, sizeRatio = 1.0, maxPage = 10 }) => {
94+
const [page, setPage] = useState(0);
95+
96+
return (
97+
<View
98+
style={{
99+
flex: 1,
100+
flexDirection: 'row',
101+
borderBottomWidth: 0.5,
102+
borderBottomColor: 'grey',
103+
marginBottom: 10,
104+
}}
105+
>
106+
<View style={{ flex: 5, flexDirection: 'column' }}>
107+
<View
108+
style={{
109+
flex: 1,
110+
justifyContent: 'space-between',
111+
flexDirection: 'row',
112+
alignItems: 'center',
113+
}}
114+
>
115+
<Text style={{ fontSize: 16, fontWeight: '400', color: 'black' }}>
116+
page
117+
</Text>
118+
<Text style={{ fontSize: 16, fontWeight: '600', color: 'grey' }}>
119+
{page + 1} / {maxPage}
120+
</Text>
121+
</View>
122+
<View
123+
style={{
124+
flex: 1,
125+
justifyContent: 'space-between',
126+
flexDirection: 'row',
127+
alignItems: 'center',
128+
}}
129+
>
130+
<Text style={{ fontSize: 16, fontWeight: '400', color: 'black' }}>
131+
sizeRatio
132+
</Text>
133+
<Text style={{ fontSize: 16, fontWeight: '600', color: 'grey' }}>
134+
{sizeRatio}
135+
</Text>
136+
</View>
137+
138+
<View
139+
style={{
140+
flex: 1,
141+
justifyContent: 'space-between',
142+
flexDirection: 'row',
143+
}}
144+
>
145+
<Button
146+
title="Prev"
147+
onPress={() => {
148+
setPage(page - 1);
149+
}}
150+
/>
151+
152+
<Button
153+
title="Next"
154+
onPress={() => {
155+
setPage(page + 1);
156+
}}
157+
/>
158+
</View>
159+
</View>
160+
161+
<View
162+
style={{
163+
flex: 1,
164+
flexDirection: 'column',
165+
justifyContent: 'center',
166+
alignItems: 'center',
167+
}}
168+
>
169+
<PaginationDot
170+
activeDotColor={color}
171+
curPage={page}
172+
maxPage={maxPage}
173+
sizeRatio={sizeRatio}
174+
vertical={true}
175+
/>
176+
</View>
177+
</View>
178+
);
179+
};
180+
181+
const App = () => {
182+
return (
183+
<View style={{ flex: 1 }}>
184+
<StatusBar barStyle="dark-content" />
185+
<View style={{ flex: 1, backgroundColor: 'white' }}>
186+
<View
187+
style={{
188+
flex: 1,
189+
justifyContent: 'center',
190+
alignItems: 'flex-start',
191+
padding: 20,
192+
}}
193+
>
194+
<Text
195+
style={{
196+
fontSize: 24,
197+
fontWeight: '600',
198+
color: 'black',
199+
}}
200+
>
201+
Animated Pagination Dots
202+
</Text>
203+
</View>
204+
<View
205+
style={{
206+
flex: 4,
207+
flexDirection: 'column',
208+
paddingVertical: 30,
209+
paddingHorizontal: 20,
210+
marginBottom: 20,
211+
}}
212+
>
213+
<TestDotContainer maxPage={20} color={'black'} sizeRatio={1} />
214+
<TestDotContainer maxPage={4} color={'green'} sizeRatio={1.0} />
215+
<TestDotVerticalContainer maxPage={10} color={'rgb(0,0,120)'} />
216+
<TestDotVerticalContainer
217+
maxPage={4}
218+
color={'blue'}
219+
sizeRatio={1.5}
220+
/>
221+
</View>
222+
</View>
223+
</View>
224+
);
225+
};
226+
227+
export default App;

0 commit comments

Comments
 (0)