summaryrefslogtreecommitdiff
path: root/frontend/src/components/game-browser/GameStatus.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/game-browser/GameStatus.jsx')
-rw-r--r--frontend/src/components/game-browser/GameStatus.jsx17
1 files changed, 17 insertions, 0 deletions
diff --git a/frontend/src/components/game-browser/GameStatus.jsx b/frontend/src/components/game-browser/GameStatus.jsx
new file mode 100644
index 00000000..4168f0a5
--- /dev/null
+++ b/frontend/src/components/game-browser/GameStatus.jsx
@@ -0,0 +1,17 @@
+//@flow
+import { Tag } from '@blueprintjs/core';
+import * as React from 'react';
+import type { GameState } from '../../models/games';
+
+export type GameStatusProps = {
+ state: GameState,
+}
+
+export const GameStatus = ({state}: GameStatusProps) => (
+ <Tag minimal intent={statusIntents[state]}>{state}</Tag>
+);
+
+const statusIntents = {
+ 'LOBBY': 'success',
+ 'PLAYING': 'warning',
+};
bgstack15