1.7.2 • Published 6 years ago
mycujoo-scoreboard v1.7.2
React Scoreboard
A React based scoreboard for the mycujoo player.
Usage
yarn add mycujoo-scoreboard
and then
import Scoreboard from 'mycujoo-scoreboard'
<Scoreboard />
And done! 🎉
API
<Scoreboard
metaData: object
sponsor: object
forceScoreHidden: boolean
competition: string
isMobile: boolean
toggleBackLogosDelay: int
imageUrlPrefix: string
onClickSponsor: function
onLoadSponsor: function
onViewSponsor: function
/>
Syntax
metaData
metaData: {
score: {
enabled: true,
data: [1, 0], // [home, away]
},
timer: {
enabled: true,
time: 30, // seconds
},
team_home: {
color: '#fff',
abbr: '123',
},
team_name: {
color: '#000',
abbr: '456',
}
}
sponsor
sponsor: {
data: {
image_url: '//placecage.com/200/300',
link_url: '//mycujoo.tv',
}
}
forceScoreHidden
Exposed to help with other components to force the component to close
forceScoreHidden: true
imageUrlPrefix
The prefix for images that do not have a domain as a fallback (I guess? I didn't write this code)
imageUrlPrefix: 'https://mycujoo-static.imgix.net'
competition
Displays the competition above the Scoreboard
scoreboard: 'U-19 league'
toggleBackLogosDelay
When the score changes, the team logos will display. This int sets the amount of ms that the logos stay open for
toggleBackLogosDelay: 4000