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.
Install project dependencies stated within package.json
# npm install
Start the development server
# npm start
Build deployment/production files
# npm run build
The widget features dynamic loading of icon images based on the available live events that are currently 'in-play'.
Please follow below instructions and information for updating images in the widget.
All images should be .png extensions.
src/assets/'name-of-sport'.png
Example: ./assets/football.png
, ./assets/american-football.png
- Add an image file to the
dist/assets/<image-name>.png
- 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.
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' | - |