Skip to content

Commit 56c35c4

Browse files
committed
feat: 💄 update example App.js
1 parent 54c48ef commit 56c35c4

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

examples/src/App.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ import { View, Text, StatusBar, Button } from 'react-native';
1010

1111
import PaginationDot from 'react-native-animated-pagination-dot';
1212

13-
const TestDotContainer = ({ color, sizeRatio = 1.0, maxPage = 10 }) => {
13+
const TestDotContainer = ({
14+
color,
15+
sizeRatio = 1.0,
16+
maxPage = 10,
17+
inactiveColor,
18+
}) => {
1419
const [page, setPage] = useState(0);
1520

1621
return (
@@ -75,6 +80,7 @@ const TestDotContainer = ({ color, sizeRatio = 1.0, maxPage = 10 }) => {
7580
<PaginationDot
7681
activeDotColor={color}
7782
curPage={page}
83+
inactiveDotColor={inactiveColor ?? undefined}
7884
maxPage={maxPage}
7985
sizeRatio={sizeRatio}
8086
/>
@@ -212,6 +218,12 @@ const App = () => {
212218
>
213219
<TestDotContainer maxPage={20} color={'black'} sizeRatio={1} />
214220
<TestDotContainer maxPage={4} color={'green'} sizeRatio={1.0} />
221+
<TestDotContainer
222+
maxPage={10}
223+
color={'blue'}
224+
inactiveColor={'red'}
225+
sizeRatio={1.0}
226+
/>
215227
<TestDotVerticalContainer maxPage={10} color={'rgb(0,0,120)'} />
216228
<TestDotVerticalContainer
217229
maxPage={4}

0 commit comments

Comments
 (0)