Giter Site home page Giter Site logo

react-native-animated-pagination-dot's People

Contributors

dependabot[bot] avatar floydkim avatar pratt3351 avatar vyarmak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-native-animated-pagination-dot's Issues

Error

error nano-css detected browser environment because of "window" global, but "document" global seems to be defective.

import PaginationDot from "react-native-animated-pagination-dot"

Language : typescript
RN : 0.63.4

Only ship .js & .d.ts files when distributing via npm

Right now, users who are trying to consume this library with TypeScript using settings like noImplicitAny are having a negative user experience because the packaged .ts files are getting fully re-checked. See microsoft/TypeScript#15363 for an example of a problem caused by this.

Running TypeScript with --declaration to produce .d.ts files and adding your regular .ts files to an .npmignore file will prevent this issue.

Custom empty dot color

have you any plans to add a possibility to change empty dot color?
today with fixed opacity at the dots in some screens is hard to see the dot that is not selected.

Captura de Tela 2022-09-06 às 08 35 24

Error build for Android

react-native: 0.61.5
"react-native-animated-pagination-dot": 0.1.8

` error SyntaxError: /var/app/XXXXX/build-20201016081531/node_modules/react-native-animated-pagination-dot/src/util/DotUtils.ts: Unexpected token, expected ";" (39:73)
15:17:28

15:17:28
37 | }
15:17:28
38 |
15:17:28

39 | export const getDotStyle = ({ idx, curPage, maxPage }:getDotStylePayload):IDotStyle => {
15:17:28
| ^
15:17:28
40 | let type = EnumDotType.SMALL;
15:17:28
41 |
15:17:28
42 | if (maxPage < 5) {. Run CLI with --verbose flag for more details.
15:17:28

15:17:28

Task :app:bundleReleaseJsAndAssets FAILED
15:17:29

`

Is there support for RTL layout?

When I change my phone language to Hebrew\Arabic, the pagination doesn't work.
I tried to set the curPage as such:

                  <PaginationDot
                      activeDotColor={'#f14447'} 
                      curPage={I18nManager.isRTL ? state.carouselItems.length - 1  - state.activeIndex : state.activeIndex} 
                      maxPage={state.carouselItems.length} // Note: my data set has 13 items
                      sizeRatio={2.0}
                  />

I don't see the first item highlighted, I only start see the curPage highlighted after 5 scrolls, and then after another 5 scrolls it disappears again.
I tried playing with the curPage setting it to different values, but it seems I cant get it to work on RTL layout.

New library to handle this

Hi man! I took some ideas of your code and I published this library:

https://github.com/felire/react-native-animated-dots-carousel

It's super configurable and works more like instagram, because in your library the active dot is always at the right when the user is coming back to the left.

So, it'd be nice if you can take a look and if you like it you can set a comment o migrate this project to that library. I can modify the README naming this library if you want. Let me know

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.