commit
c643255afb
@ -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';
|
||||||
|
|
||||||
export default function InGame() {
|
const InGame = () => {
|
||||||
|
const [showChoiceBar, setShowChoiceBar] = useState(false);
|
||||||
|
|
||||||
|
const handleNodeClick = (shouldShowChoiceBar: boolean) => {
|
||||||
|
setShowChoiceBar(shouldShowChoiceBar);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<GraphContainer />
|
<div>
|
||||||
|
<GraphContainer onNodeClick={handleNodeClick} />
|
||||||
|
<div id="bottom-container">
|
||||||
|
{showChoiceBar && <ChoiceBar />}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export default InGame;
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "commonjs",
|
|
||||||
// ...
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"allowSyntheticDefaultImports": true,
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"target": "es5",
|
|
||||||
"lib": ["d"es2017""es2015"],
|
|
||||||
"jsx": "react",
|
|
||||||
"strict": true
|
|
||||||
},
|
|
||||||
// ...
|
// ...
|
||||||
}
|
"resolveJsonModule": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"target": "es5",
|
||||||
|
"lib": ["dom", "es2015"],
|
||||||
|
"jsx": "react",
|
||||||
|
"strict": true
|
||||||
|
},
|
||||||
|
// ...
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue