Added points icon

This commit is contained in:
2023-07-27 14:16:12 +03:00
parent e60d5d6732
commit 40c5f08dfe
2 changed files with 17 additions and 1 deletions

View File

@ -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>
)
}