Documentation does not show the correct way to pass in multiple colors
teenageknight opened this issue · comments
Bryce Jackson commented
This package, when passing in multiple colors, either takes in one string representing that color or an array of color tuples. If you run the code as-is, you get a null pointer exception, as seen in the picture.
Bryce Jackson commented
import { CountdownCircleTimer } from 'react-native-countdown-circle-timer'
const UrgeWithPleasureComponent = () => (
<CountdownCircleTimer
isPlaying
duration={7}
colors={['#004777', '#F7B801', '#A30000', '#A30000']}
colorsTime={[7, 5, 2, 0]}
>
{({ remainingTime }) => <Text>{remainingTime}</Text>}
</CountdownCircleTimer>
)
This is what i was talking about
Vasil Dimitrov commented
Hey @teenageknight, it seems to be working fine, you can check it in this Snack. Can you reproduce your issue in Expo Snack and share a link?