mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-06 07:37:56 +02:00
16 lines
509 B
TypeScript
16 lines
509 B
TypeScript
import * as React from "react";
|
|
import { formatHashes } from "../formatNumber";
|
|
import { Theme } from "@mui/material/styles";
|
|
import { makeStyles } from "tss-react/mui";
|
|
|
|
const useStyles = makeStyles()((theme: Theme) => ({
|
|
money: {
|
|
color: theme.colors.money,
|
|
},
|
|
}));
|
|
|
|
export function Hashes({ hashes }: { hashes: number | string }): React.ReactElement {
|
|
const { classes } = useStyles();
|
|
return <span className={classes.money}>{typeof hashes === "number" ? formatHashes(hashes) : hashes}</span>;
|
|
}
|