Skip to content

Commit 6befa69

Browse files
committed
Remove rl-loadout-lib and replace Material-UI with the updated library
rl-loadout-lib is mostly useless right now and is just bloat with its dependencies. The material-ui library is also renamed to @mui and is in a new location. Requires some minor changes to imports and refactoring of some components. Seems to work okay though there are some visual issues with the new library in /docs.
1 parent fcf23cc commit 6befa69

19 files changed

+1165
-3372
lines changed

docs/package-lock.json

Lines changed: 42 additions & 3012 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"license": "MIT",
1717
"devDependencies": {
1818
"@types/react-dom": "^17.0.14",
19-
"awesome-typescript-loader": "^5.2.1",
2019
"file-loader": "^6.2.0",
2120
"html-webpack-plugin": "^5.5.0",
2221
"typescript": "^4.6.3",

docs/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Tab from "@material-ui/core/Tab"
2-
import Tabs from "@material-ui/core/Tabs"
1+
import Tab from "@mui/material/Tab"
2+
import Tabs from "@mui/material/Tabs"
33
import React, { Component } from "react"
44

55
import Main from "./components/Main"

docs/src/components/CompactViewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Grid from "@material-ui/core/Grid"
1+
import Grid from "@mui/material/Grid"
22
import React, { Component } from "react"
33

44
import {

docs/src/components/Viewer.tsx

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import Grid from "@material-ui/core/Grid"
2-
import withStyles, { WithStyles } from "@material-ui/core/styles/withStyles"
1+
import Grid from "@mui/material/Grid"
32
import React, { Component } from "react"
43

54
import {
5+
DrawingControls,
66
FieldCameraControls,
77
GameBuilderOptions,
88
GameManager,
@@ -11,26 +11,24 @@ import {
1111
PlayerCameraControls,
1212
ReplayViewer,
1313
Slider,
14-
DrawingControls
1514
} from "../../../src"
1615

17-
interface Props extends WithStyles {
16+
interface Props {
1817
options: GameBuilderOptions
1918
}
2019

2120
interface State {
2221
gameManager?: GameManager
2322
}
2423

25-
class Viewer extends Component<Props, State> {
24+
export default class Viewer extends Component<Props, State> {
2625
constructor(props: Props) {
2726
super(props)
2827
this.state = {}
2928
}
3029

3130
renderContent() {
3231
const { gameManager } = this.state
33-
const { root } = this.props.classes
3432

3533
if (!gameManager) {
3634
return "Food machine broke..."
@@ -39,7 +37,11 @@ class Viewer extends Component<Props, State> {
3937
return (
4038
<Grid
4139
container
42-
className={root}
40+
sx={{
41+
"&& > div:nth-child(even)": {
42+
backgroundColor: "rgba(0, 0, 0, 0.05)",
43+
},
44+
}}
4345
direction="column"
4446
justifyContent="center"
4547
spacing={3}
@@ -86,10 +88,3 @@ class Viewer extends Component<Props, State> {
8688
}
8789
}
8890

89-
export default withStyles({
90-
root: {
91-
"&& > div:nth-child(even)": {
92-
backgroundColor: "rgba(0, 0, 0, 0.05)",
93-
},
94-
},
95-
})(Viewer)

0 commit comments

Comments
 (0)