convert blade to mui

This commit is contained in:
Olivier Gagnon
2021-09-27 17:09:48 -04:00
parent 498a204c88
commit 86678b6290
50 changed files with 1921 additions and 1527 deletions
+3 -2
View File
@@ -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>&#9608;</span>}
</pre>
</Typography>
</>
);
}
+4 -6
View File
@@ -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>
);
}
+10
View File
@@ -261,6 +261,16 @@ export function refreshTheme(): void {
},
},
},
MuiTab: {
styleOverrides: {
textColorPrimary: {
color: Settings.theme.secondary,
"&.Mui-selected": {
color: Settings.theme.primary,
},
},
},
},
},
});
}