summaryrefslogtreecommitdiff
path: root/frontend/src/components/game-browser/GameStatus.jsx
blob: 4168f0a5a917b1f0ca81073918d3ec9b1787f3d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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