From 2382a452456e4bdef4584e1046925e372624cb79 Mon Sep 17 00:00:00 2001 From: Joffrey BION Date: Thu, 16 May 2019 23:48:38 +0200 Subject: Rationalize module names --- sw-ui/src/components/lobby/PlayerList.tsx | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sw-ui/src/components/lobby/PlayerList.tsx (limited to 'sw-ui/src/components/lobby/PlayerList.tsx') diff --git a/sw-ui/src/components/lobby/PlayerList.tsx b/sw-ui/src/components/lobby/PlayerList.tsx new file mode 100644 index 00000000..bfc3a56c --- /dev/null +++ b/sw-ui/src/components/lobby/PlayerList.tsx @@ -0,0 +1,41 @@ +import { Classes, Icon } from '@blueprintjs/core' +import { List } from 'immutable'; +import * as React from 'react'; +import { Flex } from 'reflexbox'; +import { ApiPlayer } from '../../api/model'; + +type PlayerListItemProps = { + player: ApiPlayer, + isOwner: boolean, + isUser: boolean, +}; + +const PlayerListItem = ({player, isOwner, isUser}: PlayerListItemProps) => ( + + + + {isOwner && } + {isUser && } + + + {player.displayName} + {player.username} + +); + +type PlayerListProps = { + players: List, + owner: string, + currentPlayer: ApiPlayer, +}; + +export const PlayerList = ({players, owner, currentPlayer}: PlayerListProps) => ( + + + {players.map((player: ApiPlayer) => )} + +
+); -- cgit