parent
515a5e1407
commit
2ba40fee93
@ -0,0 +1,22 @@
|
|||||||
|
.choice-bar-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.choice-bar-heading {
|
||||||
|
font-size: 1.5em;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.choice-bar-button {
|
||||||
|
margin: 5px;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: lightseagreen;
|
||||||
|
color: #fff;
|
||||||
|
border: 2px solid grey;
|
||||||
|
border-radius: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import './ChoiceBar.css';
|
||||||
|
|
||||||
|
const ChoiceBar = () => {
|
||||||
|
const players = ['Player1', 'Player2', 'Player3'];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="choice-bar-container">
|
||||||
|
<h3 className="choice-bar-heading">Quel joueur voulez-vous interroger ?</h3>
|
||||||
|
<div>
|
||||||
|
{players.map((player, index) => (
|
||||||
|
<button key={index} className="choice-bar-button">
|
||||||
|
{player}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ChoiceBar;
|
@ -1,8 +1,23 @@
|
|||||||
import React from "react";
|
import React, { useState } from 'react';
|
||||||
import GraphContainer from "../Components/GraphContainer";
|
import GraphContainer from '../Components/GraphContainer';
|
||||||
|
import ChoiceBar from '../Components/ChoiceBar';
|
||||||
|
|
||||||
|
const InGame = () => {
|
||||||
|
const [showChoiceBar, setShowChoiceBar] = useState(false);
|
||||||
|
|
||||||
|
const handleNodeClick = (shouldShowChoiceBar: boolean) => {
|
||||||
|
setShowChoiceBar(shouldShowChoiceBar);
|
||||||
|
};
|
||||||
|
|
||||||
export default function InGame() {
|
|
||||||
return (
|
return (
|
||||||
<GraphContainer />
|
<div>
|
||||||
|
<GraphContainer onNodeClick={handleNodeClick} />
|
||||||
|
<div id="bottom-container">
|
||||||
|
{showChoiceBar && <ChoiceBar />}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export default InGame;
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue