Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overtime true is not going to negative #158

Closed
mtahirofficial opened this issue Oct 14, 2021 · 1 comment · Fixed by #159
Closed

overtime true is not going to negative #158

mtahirofficial opened this issue Oct 14, 2021 · 1 comment · Fixed by #159

Comments

@mtahirofficial
Copy link

mtahirofficial commented Oct 14, 2021

We tried to implement overtime true but it stops at 0:0:0 and not goes to negative time. Please help us to make it possible, we may be doing something wrong

`const renderer = ({ hours, minutes, seconds, completed }) => {
return (

{hours}:{minutes}:{seconds}

);
};

ReactDOM.render(
<Countdown date={Date.now() + 5000} renderer={renderer} overtime={false}/>,
document.getElementById("root")
);`

@ndresx
Copy link
Owner

ndresx commented Oct 16, 2021

Hi, since you are providing a custom renderer, you would have to render this yourself, as you can see here https://github.com/ndresx/react-countdown/blob/master/src/Countdown.tsx#L343. You can check for ´total < 0`, which signalizes that the countdown went into overtime. I hope this helps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants