summaryrefslogtreecommitdiff
path: root/sw-ui/src/components/game-browser/GameStatus.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'sw-ui/src/components/game-browser/GameStatus.tsx')
-rw-r--r--sw-ui/src/components/game-browser/GameStatus.tsx17
1 files changed, 17 insertions, 0 deletions
diff --git a/sw-ui/src/components/game-browser/GameStatus.tsx b/sw-ui/src/components/game-browser/GameStatus.tsx
new file mode 100644
index 00000000..5f237258
--- /dev/null
+++ b/sw-ui/src/components/game-browser/GameStatus.tsx
@@ -0,0 +1,17 @@
+import { Tag } from '@blueprintjs/core';
+import { Intent } from '@blueprintjs/core';
+import * as React from 'react';
+import { ApiGameState } from '../../api/model';
+
+type GameStatusProps = {
+ state: ApiGameState,
+}
+
+export const GameStatus = ({state}: GameStatusProps) => (
+ <Tag minimal intent={statusIntents[state]}>{state}</Tag>
+);
+
+const statusIntents = {
+ 'LOBBY': Intent.SUCCESS,
+ 'PLAYING': Intent.WARNING,
+};
bgstack15