You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
478 B
23 lines
478 B
import React from "react"
|
|
import "../../style/player.css"
|
|
import { Team } from "../../tactic/Team"
|
|
|
|
export interface PlayerPieceProps {
|
|
team: Team
|
|
text: string
|
|
hasBall: boolean
|
|
}
|
|
|
|
export function PlayerPiece({ team, text, hasBall }: PlayerPieceProps) {
|
|
let className = `player-piece ${team}`
|
|
if (hasBall) {
|
|
className += ` player-piece-has-ball`
|
|
}
|
|
|
|
return (
|
|
<div className={className}>
|
|
<p>{text}</p>
|
|
</div>
|
|
)
|
|
}
|