thmsgbrt / react-simple-pull-to-refresh

npm install react-simple-pull-to-refresh

Home Page:https://www.npmjs.com/package/react-simple-pull-to-refresh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom color on the loading indicator

inspiratech-llc opened this issue · comments

I am trying to apply custom styling so that the loading indicator stands out more on my dark background (honestly just trying to make it white). I am having trouble getting css to apply after trying the classNames and style attributes with no luck.

I would love to see this color configurable through a prop likebackgroundColor. The component is working as expected, aside from me not knowing how to set the color, thanks for the awesome work!

Dug some more with a clear mind the next morning and managed to override the styles.

This is the css I used:

.ptr__pull-down--pull-more {
    color: white !important;
    text-align: center;
}

.lds-ellipsis div {
    background-color: white !important;
    text-align: center;
}

And just make sure you import the css in the component where you are using your custom styled Pull to refresh.

import './Custom.css';