Giter Club home page Giter Club logo

Comments (6)

cgarvis avatar cgarvis commented on July 20, 2024 11

This is what I ended up doing. I had to dig into the code to pull out the default dot styles and change just the color. I can see this being the most changed attribute, so why not make it easy.

<Swiper dotColor="#000" activeDotColor="red" />

from react-native-swiper.

leecade avatar leecade commented on July 20, 2024 3

hi @cgarvis

The prop dot / activeDot maybe is what's your need.

<Swiper 
dot={<View style={{backgroundColor:'rgba(0,0,0,.2)', width: 5, height: 5,borderRadius: 4, marginLeft: 3, marginRight: 3, marginTop: 3, marginBottom: 3,}} />}
          activeDot={<View style={{backgroundColor: '#000', width: 8, height: 8, borderRadius: 4, marginLeft: 3, marginRight: 3, marginTop: 3, marginBottom: 3,}} />}
>

See how to use in example: https://github.com/leecade/react-native-swiper/blob/master/examples/examples/swiper.js#L64

from react-native-swiper.

leecade avatar leecade commented on July 20, 2024

I see, I consider that someone need to change the size postion or something else.
As you said, maybe a shortcut prop to do this is a better way
And would u like send a PR for this feature, or I will do it later

from react-native-swiper.

denizs avatar denizs commented on July 20, 2024

I completely agree with @cgarvis. I guess this ist the most changed attribute by far.
Would you mind me making a pull request?
Best,
D

from react-native-swiper.

leecade avatar leecade commented on July 20, 2024

@denizs PR is welcome

from react-native-swiper.

denizs avatar denizs commented on July 20, 2024

Pr is in! #298

from react-native-swiper.

Related Issues (20)

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.