mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-03 22:37:06 +02:00
convert blade to mui
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
interface IProps {
|
||||
text: string;
|
||||
@@ -34,10 +35,10 @@ export function CinematicLine(props: IProps): React.ReactElement {
|
||||
});
|
||||
return (
|
||||
<>
|
||||
<pre>
|
||||
<Typography>
|
||||
{props.text.slice(0, length)}
|
||||
{!done && <span>█</span>}
|
||||
</pre>
|
||||
</Typography>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import React, { useState } from "react";
|
||||
|
||||
import { CinematicLine } from "./CinematicLine";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Button from "@mui/material/Button";
|
||||
|
||||
interface IProps {
|
||||
lines: string[];
|
||||
@@ -24,14 +26,10 @@ export function CinematicText(props: IProps): React.ReactElement {
|
||||
return (
|
||||
<div>
|
||||
{props.lines.slice(0, i).map((line, i) => (
|
||||
<pre key={i}>{line}</pre>
|
||||
<Typography key={i}>{line}</Typography>
|
||||
))}
|
||||
{props.lines.length > i && <CinematicLine key={i} text={props.lines[i]} onDone={advance} />}
|
||||
{!props.auto && props.onDone && done && (
|
||||
<button className="std-button" onClick={props.onDone}>
|
||||
Continue ...
|
||||
</button>
|
||||
)}
|
||||
{!props.auto && props.onDone && done && <Button onClick={props.onDone}>Continue ...</Button>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -261,6 +261,16 @@ export function refreshTheme(): void {
|
||||
},
|
||||
},
|
||||
},
|
||||
MuiTab: {
|
||||
styleOverrides: {
|
||||
textColorPrimary: {
|
||||
color: Settings.theme.secondary,
|
||||
"&.Mui-selected": {
|
||||
color: Settings.theme.primary,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user