mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
refactor(match-details): new style to highlight best player stat
This commit is contained in:
parent
20b7bc08e0
commit
f55405fc4d
1 changed files with 9 additions and 1 deletions
|
|
@ -269,10 +269,18 @@ export default {
|
|||
const value = parseFloat(player.stats[stats])
|
||||
const biggestValue = Math.max(...this.allPlayers.map(p => parseFloat(p.stats[stats])), 0)
|
||||
const opacity = (value / biggestValue).toFixed(2)
|
||||
const biggestValueStyle = {}
|
||||
if (value === biggestValue && value !== 0) {
|
||||
biggestValueStyle.boxShadow = 'rgba(181, 160, 122, 0.5) 0px 0px 10px'
|
||||
biggestValueStyle.border = '2px solid'
|
||||
biggestValueStyle.borderImageSlice = '1'
|
||||
biggestValueStyle.borderImageSource = 'linear-gradient(to top, #edb457, #f9e9ce)'
|
||||
biggestValueStyle.borderCollapse = 'separate'
|
||||
}
|
||||
|
||||
return {
|
||||
backgroundColor: `rgba(${rgb}, ${opacity})`,
|
||||
boxShadow: value === biggestValue && value !== 0 ? '#abb4d0 0px 0px 0px 2px inset' : ''
|
||||
...biggestValueStyle
|
||||
}
|
||||
},
|
||||
displayBorderbottom(index) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue