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.
54 lines
1005 B
54 lines
1005 B
|
|
import '../style/teamPanel.css'
|
|
|
|
|
|
interface TeamInfo{
|
|
id: number
|
|
name: string
|
|
picture: string
|
|
mainColor: string
|
|
secondColor: string
|
|
}
|
|
|
|
interface Team {
|
|
info: TeamInfo
|
|
members: Member[]
|
|
}
|
|
|
|
interface Member{
|
|
id: number
|
|
|
|
role: string
|
|
}
|
|
|
|
|
|
export default function TeamPanel({isCoach, team}: {isCoach: boolean, team: Team }){
|
|
return (
|
|
<div>
|
|
<TeamDisplay name={isCoach ? "vrai je suis coach" : "non"}/>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
function TeamDisplay({name,picture,mainColor,secondColor}: {name: string,picture : string,mainColor}) {
|
|
return (
|
|
<div>
|
|
<h1>{name}</h1>
|
|
<img src={picture} alt="Logo d'équipe" class="logo"/>
|
|
</div>
|
|
<div id="colors">
|
|
<Color/>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
function Color({color}: {color : string}){
|
|
return(
|
|
<div className="color"><p>Couleur principale : </p>
|
|
<div className="square" style="background-color:{color}"></div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
|