From 1cf762254c7a711912201491ab91744b96cb9054 Mon Sep 17 00:00:00 2001 From: djmil Date: Tue, 31 Oct 2023 10:16:35 +0100 Subject: [PATCH] mock implementstion --- webapp/src/components/Game.jsx | 2 ++ webapp/src/components/Game/Message2Opponent.css | 6 ++++++ webapp/src/components/Game/Message2Opponent.jsx | 15 +++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 webapp/src/components/Game/Message2Opponent.css create mode 100644 webapp/src/components/Game/Message2Opponent.jsx diff --git a/webapp/src/components/Game.jsx b/webapp/src/components/Game.jsx index d4878f2..e4d49c1 100644 --- a/webapp/src/components/Game.jsx +++ b/webapp/src/components/Game.jsx @@ -6,6 +6,7 @@ import GameAction from './Game/GameAction' import GameBoard from './Game/GameBoard' import NewGame from './Game/NewGame' import GameMessage from './Game/GameMessage' +import Message2Opponent from './Game/Message2Opponent' export default function Game() { @@ -20,6 +21,7 @@ export default function Game() { + ) diff --git a/webapp/src/components/Game/Message2Opponent.css b/webapp/src/components/Game/Message2Opponent.css new file mode 100644 index 0000000..6110b41 --- /dev/null +++ b/webapp/src/components/Game/Message2Opponent.css @@ -0,0 +1,6 @@ +.message2opponent { + border-radius: 3px; + border-color: lightgray; + background-color:violet; + width: 70%; +} \ No newline at end of file diff --git a/webapp/src/components/Game/Message2Opponent.jsx b/webapp/src/components/Game/Message2Opponent.jsx new file mode 100644 index 0000000..4bda210 --- /dev/null +++ b/webapp/src/components/Game/Message2Opponent.jsx @@ -0,0 +1,15 @@ +import './Message2Opponent.css' +import React from 'react' + +import { AppContext } from '../../context/app' + +export default function Message2Opponent() { + + const [ctx] = React.useContext(AppContext) + + return ( +
+ Message to opponent +
+ ) +}