Skip to content

Instantly share code, notes, and snippets.

@owain-stratton
Last active February 28, 2017 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save owain-stratton/e828ae4c0fec50763a8178dce350e9c0 to your computer and use it in GitHub Desktop.
Save owain-stratton/e828ae4c0fec50763a8178dce350e9c0 to your computer and use it in GitHub Desktop.
Nav slider widget for 888 sports betting

Nav Slider

The nav-slider widget component is built using ReactJS and the Kambi Widget Core Library. It provides a convenient navigation by icon slider for in-play live betting within the 888 sports book.

Running the widget for development

Install project dependencies stated within package.json
# npm install

Start the development server
# npm start

Building for production

Build deployment/production files
# npm run build

Widget Notes

The widget features dynamic loading of icon images based on the available live events that are currently 'in-play'.

Updating images in the widget

Please follow below instructions and information for updating images in the widget.

Image Filenames

All images should be .png extensions.

src/assets/'name-of-sport'.png

Example: ./assets/football.png, ./assets/american-football.png

Update Icon Map Object
  1. Add an image file to the dist/assets/<image-name>.png
  2. In the widget settings add a new key: value pair to the arguments object. This will be merged with the default icons within the widget in the current build.
    • Key: should match the sport name from the Kambi Sportsbook API (in lower case). n.b. see table below for sport names
    • Value: should be the relative path to the image within the ./assets folder.

Sports

A, non-exhaustive, list of sports supported by the Kambi Sportsbook API. This can be used to see which sports currently have icons supported by the widget and which are missing.

As of: 2017-02-27

Sport Name Icon
'tennis' YES
'football' YES
'gallops' -
'ice_hockey' YES
'basketball' YES
'volleyball' YES
'handball' YES
'greyhounds' YES
'motorsports' YES
'american_football' YES
'australian_rules' -
'bandy' -
'baseball' -
'boxing' YES
'chess' -
'cricket' YES
'cycling' YES
'darts' YES
'esports' -
'floorball' -
'golf' YES
'netball' -
'pesapallo' -
'politics' -
'rugby_league' -
'rugby_union' -
'snooker' YES
'surfing' -
'non_sport' -
'martial_arts' -
'winter_olympic_games' -
'winter-xgames' -
'wintersports' YES
'sports_entertainment' -
'yachting' -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment