From b064ffab80cfccd0cfaa326275a5a3194e112be6 Mon Sep 17 00:00:00 2001 From: Joffrey BION Date: Sat, 9 Jun 2018 16:23:49 +0200 Subject: Improve game list's style --- .../src/components/game-browser/GameBrowser.jsx | 7 +-- frontend/src/components/game-browser/GameList.css | 3 ++ frontend/src/components/game-browser/GameList.jsx | 54 +++++++++++++++++----- .../src/components/game-browser/GameStatus.jsx | 17 +++++++ .../src/components/game-browser/PlayerCount.css | 3 ++ .../src/components/game-browser/PlayerCount.jsx | 13 ++++++ 6 files changed, 80 insertions(+), 17 deletions(-) create mode 100644 frontend/src/components/game-browser/GameList.css create mode 100644 frontend/src/components/game-browser/GameStatus.jsx create mode 100644 frontend/src/components/game-browser/PlayerCount.css create mode 100644 frontend/src/components/game-browser/PlayerCount.jsx (limited to 'frontend/src/components/game-browser') diff --git a/frontend/src/components/game-browser/GameBrowser.jsx b/frontend/src/components/game-browser/GameBrowser.jsx index db0bbb9a..84abd978 100644 --- a/frontend/src/components/game-browser/GameBrowser.jsx +++ b/frontend/src/components/game-browser/GameBrowser.jsx @@ -41,14 +41,11 @@ class GameBrowserPresenter extends Component { } const CreateGameButton = ({onClick}) => ( - + - - ); - })} - + + + + + + {games.map((game: Game) => )} + +
); +const GameListHeaderRow = () => ( + + Name + Status + Nb Players + Join + +); + +const GameListItemRow = ({game, joinGame}) => ( + + {game.name} + + + + + + + + + + +); + +const JoinButton = ({game, joinGame}) => { + const disabled = game.state !== 'LOBBY'; + const icon = ; + return