signal-desktop/ts/components/Countdown.md

24 lines
459 B
Markdown
Raw Normal View History

2019-06-26 19:33:13 +00:00
#### New timer
```jsx
<div style={{ backgroundColor: 'darkgray' }}>
<Countdown
expiresAt={Date.now() + 10 * 1000}
duration={10 * 1000}
onComplete={() => console.log('onComplete - new timer')}
/>
</div>
```
#### Already started
```jsx
<div style={{ backgroundColor: 'darkgray' }}>
<Countdown
expiresAt={Date.now() + 10 * 1000}
duration={30 * 1000}
onComplete={() => console.log('onComplete - already started')}
/>
</div>
```