mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-24 07:02:26 +01:00
Move ProgressBar
component
This commit is contained in:
parent
9c805dabb8
commit
05078ffb08
@ -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 (
|
||||
<Grid item xs={12}>
|
||||
<TimerProgress variant="determinate" value={v} color="primary" />
|
||||
<ProgressBar variant="determinate" value={v} color="primary" />
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
|
13
src/ui/React/Progress.tsx
Normal file
13
src/ui/React/Progress.tsx
Normal file
@ -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);
|
Loading…
Reference in New Issue
Block a user