1.0.3 • Published 7 years ago

live-football-match-timer v1.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

Live football match timer

React component for showing live football match timer

Pre-requisites

Install Dependencies

npm install

Run example App

npm start

Open localhost:9000

Example

import MatchTimer from 'live-football-match-timer';

const config = {
  matchDate: '2018/12/12',
  id: '23',
  startTime: '13:00',
};

class YourComponent extends React.Component {
  constructor(props, context) {
    super(props, context);
    this.state = {
    };
  }
  render() {
    return (
      <div >
        <MatchTimer config={config} />
      </div>
    );
  }
}

Config

You can custmize config param pass to component

Required params

NameTypeDefaultDescription
matchDatestring-Match date in YYYY/MM/DD format
idstring-Unique match identifier
startTimestring-match start time in 24 hour format hh:mm

Optinal params

NameTypeDefaultDescription
eachHalfTimenumber45Each half Time
halfBreakTimenumber15-
firstHalfExtraTimenumber0-
secondHalfExtraTimenumber0-
containerClassstringnullContainer div class for component
TimerClassstringnullTimer span class
macthStatusTextClassstringnullExtra match status info div class for text Live/HT/FT and extra time with seconds