talalmajali / react-native-countdown-component

React Native CountDown
MIT License
271 stars 234 forks source link

anyway to show the standard : notation as a seperator? #23

Closed NanoMeko closed 5 years ago

NanoMeko commented 5 years ago

Instead of the boxes , would it be possible to have a simple style mm:ss style? For example: 10:34 I set the background to white but it looks strange without the :

Richi2293 commented 5 years ago

I think you would like something like that, it would also be useful to me. You could put a Boolean variable to make this type of separator optional.

image

azhararmar commented 5 years ago

I have created pull request for this https://github.com/talalmajali/react-native-countdown-component/pull/24

Meanwhile my forked repo allows to set what you are seeking for, here is how I am doing it.

<CountDown
      until={3600}
      timeLabels={{m: '', h: '', s: ''}}
      digitStyle={{backgroundColor: 'transparent', width: 25, height: 25}}
      digitTxtStyle={{color: '#ffffff'}
      timeToShow={['H', 'M', 'S']}
      onFinish={() => alert('finished')}
      onPress={() => alert('hello')}
      separator={':'}
      size={20}
/>

Here is how it looks in my app

screenshot 2019-01-21 at 2 04 53 am
talalmajali commented 5 years ago

@NanoMeko @Richi2293 it was added in this commit 6f1089090d7f4cac8beb7b2399988183f8f398b8 please update to 2.1.0