@cross-works/timer

0.5.0 • Public • Published

Global components for the Cycleball-Tournament-Manager Project

React components that implement the calculation, formatting and editing of a timer.

Installation

These components are available as an npm package

npm install @cross-works/timer

Components

Timer

The timer component implements the counter and the paused counter of a game.

It is located under the lib folder.

The component needs as parameters:
renderCounter: true or false, says if the counter of the game should be rendered
renderCounterPaused: true or false, says if the counter of the paused game should be rendered

elapsed: current milliseconds of the running game for the counter
lastRun: milliseconds of the last run for the counter
elapsedPaused: current milliseconds of the paused time for the paused counter
lastRunPaused: milliseconds of the last run for the paused counter
time: the play time of a game (usually 7 minutes)
stopped: true or false, says if the game is currently stopped
timeEditable: true or false, says if the game is currently editable
setTime: true or false, says if the game is currently stopped

startCounter: true or false, says if the counter should be started
startCounterPaused: true or false, says if the paused counter should be started

showPausedTimerTK: true or false, says if the paused counter should be shown on the timekeeper UI
showPausedTimerSB: true or false, says if the paused counter should be shown on the scoreboard UI

onShowPausedTime: returns true or false, says if the paused counter is showed
onTimeEditing: returns true or false, says if the time is currently editable
onSaveTime: returns the changed value of elapsed
onFinished: says if the period of a game has finished

Readme

Keywords

none

Package Sidebar

Install

npm i @cross-works/timer

Weekly Downloads

3

Version

0.5.0

License

none

Unpacked Size

42.2 kB

Total Files

8

Last publish

Collaborators

  • adixsg
  • cross-works-fbo
  • cross-works-nw