summaryrefslogtreecommitdiff
path: root/frontend/src/components/game-browser/GameStatus.jsx
blob: 749d3cfae01290f84a4e5f160aa62003934fe511 (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';

type GameStatusProps = {
  state: GameState,
}

export const GameStatus = ({state}: GameStatusProps) => (
  <Tag minimal intent={statusIntents[state]}>{state}</Tag>
);

const statusIntents = {
  'LOBBY': 'success',
  'PLAYING': 'warning',
};
bgstack15