forked from polka_billy/porridger
Added user points indicator
This commit is contained in:
24
front/src/components/Points.tsx
Normal file
24
front/src/components/Points.tsx
Normal file
@ -0,0 +1,24 @@
|
||||
import { CSSProperties } from 'react'
|
||||
|
||||
type PointsProps = {
|
||||
points?: number
|
||||
}
|
||||
|
||||
const styles = {
|
||||
container: {
|
||||
paddingBottom: 8,
|
||||
} as CSSProperties,
|
||||
points: {
|
||||
float: 'right',
|
||||
} as CSSProperties,
|
||||
}
|
||||
|
||||
function Points({ points }: PointsProps) {
|
||||
return (
|
||||
<div style={styles.container}>
|
||||
<h5>Набрано очков: <span style={styles.points}>{points}</span></h5>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Points
|
@ -10,3 +10,4 @@ export { default as AuthForm } from './AuthForm'
|
||||
export { default as BackHeader } from './BackHeader'
|
||||
export { default as CategoryPreview } from './CategoryPreview'
|
||||
export { default as StoriesPreview } from './StoriesPreview'
|
||||
export { default as Points } from './Points'
|
||||
|
Reference in New Issue
Block a user