forked from polka_billy/porridger
Added points icon
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
import { CSSProperties } from 'react'
|
||||
|
||||
import handStarsIcon from '../assets/handStars.svg'
|
||||
|
||||
type PointsProps = {
|
||||
points?: number
|
||||
}
|
||||
@ -11,12 +13,19 @@ const styles = {
|
||||
points: {
|
||||
float: 'right',
|
||||
} as CSSProperties,
|
||||
icon: {
|
||||
height: 24,
|
||||
paddingBottom: 5,
|
||||
} as CSSProperties,
|
||||
}
|
||||
|
||||
function Points({ points }: PointsProps) {
|
||||
return (
|
||||
<div style={styles.container}>
|
||||
<h5>Набрано очков: <span style={styles.points}>{points}</span></h5>
|
||||
<h5>
|
||||
Набрано очков:
|
||||
<span style={styles.points}><img style={styles.icon} src={handStarsIcon} alt='Hand giving stars icon' /> {points}</span>
|
||||
</h5>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user