Implement tooltips

This commit is contained in:
fragosti
2018-07-20 09:55:08 -07:00
parent f27084ced4
commit 3bf12a98a7
2 changed files with 56 additions and 8 deletions

View File

@@ -3,7 +3,11 @@ import CircularProgress from 'material-ui/CircularProgress';
import * as React from 'react';
import { styled } from 'ts/style/theme';
export type AllowanceState = 'locked' | 'unlocked' | 'loading';
export enum AllowanceState {
Locked,
Unlocked,
Loading,
}
export interface AllowanceStateViewProps {
allowanceState: AllowanceState;
@@ -11,11 +15,11 @@ export interface AllowanceStateViewProps {
export const AllowanceStateView: React.StatelessComponent<AllowanceStateViewProps> = ({ allowanceState }) => {
switch (allowanceState) {
case 'locked':
case AllowanceState.Locked:
return renderLock();
case 'unlocked':
case AllowanceState.Unlocked:
return renderCheck();
case 'loading':
case AllowanceState.Loading:
return <CircularProgress size={15} thickness={2} />;
default:
return null;