diff --git a/src/Infiltration/ui/GameTimer.tsx b/src/Infiltration/ui/GameTimer.tsx index c6ea60f44..6af6351f3 100644 --- a/src/Infiltration/ui/GameTimer.tsx +++ b/src/Infiltration/ui/GameTimer.tsx @@ -1,20 +1,8 @@ -import LinearProgress from "@mui/material/LinearProgress"; -import React, { useState, useEffect } from "react"; -import withStyles from "@mui/styles/withStyles"; -import { Theme } from "@mui/material/styles"; import Grid from "@mui/material/Grid"; -import { use } from "../../ui/Context"; +import React, { useEffect, useState } from "react"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; - -const TimerProgress = withStyles((theme: Theme) => ({ - root: { - backgroundColor: theme.palette.background.paper, - }, - bar: { - transition: "none", - backgroundColor: theme.palette.primary.main, - }, -}))(LinearProgress); +import { use } from "../../ui/Context"; +import { ProgressBar } from "../../ui/React/Progress"; interface IProps { millis: number; @@ -44,7 +32,7 @@ export function GameTimer(props: IProps): React.ReactElement { // bar physically reaches the end return ( - + ); } diff --git a/src/ui/React/Progress.tsx b/src/ui/React/Progress.tsx new file mode 100644 index 000000000..0a29ae311 --- /dev/null +++ b/src/ui/React/Progress.tsx @@ -0,0 +1,13 @@ +import LinearProgress from "@mui/material/LinearProgress"; +import { Theme } from "@mui/material/styles"; +import withStyles from "@mui/styles/withStyles"; + +export const ProgressBar = withStyles((theme: Theme) => ({ + root: { + backgroundColor: theme.palette.background.paper, + }, + bar: { + transition: "none", + backgroundColor: theme.palette.primary.main, + }, +}))(LinearProgress);