dev menu in mui

This commit is contained in:
Olivier Gagnon
2021-09-13 20:37:35 -04:00
parent 70cb4b215d
commit 05fd85002c
28 changed files with 1908 additions and 1602 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
*/
import * as React from "react";
import { BBAccordion } from "./Accordion";
import { BBAccordion } from "./BBAccordion";
import { Augmentation } from "../../Augmentation/Augmentation";
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
+1 -1
View File
@@ -6,7 +6,7 @@
*/
import * as React from "react";
import { BBAccordion } from "./Accordion";
import { BBAccordion } from "./BBAccordion";
import { SourceFile } from "../../SourceFile/SourceFile";
-37
View File
@@ -7,48 +7,11 @@ import React from "react";
import { TextField as MuiTF, TextFieldProps, makeStyles } from "@material-ui/core";
import { colors } from "./Theme";
const useStyles = makeStyles({
// Tries to emulate StdButton in buttons.scss
root: {
backgroundColor: colors.well,
color: "white",
borderRadius: 0,
"& .MuiInputBase-input": {
color: colors.primarylight, // Text color
},
"& .MuiInputBase-input::placeholder::before": {
color: colors.primarydark,
userSelect: "none",
},
"& .MuiInput-underline:before": {
borderBottomColor: colors.primarydark,
},
"& .MuiInput-underline:hover:before": {
borderBottomColor: colors.primary,
},
"& .MuiInput-underline:after": {
borderBottomColor: colors.primarylight,
},
"& .MuiInputLabel-root::before": {
color: colors.primary,
},
"& .MuiInputLabel-root": {
// The little label on the top-right
color: colors.primary, // unfocused
userSelect: "none",
"&.Mui-focused": {
color: colors.primarylight, // focused
},
},
},
});
export const TextField: React.FC<TextFieldProps> = (props: TextFieldProps) => {
return (
<MuiTF
{...props}
classes={{
...useStyles(),
...props.classes,
}}
/>
+58
View File
@@ -27,6 +27,64 @@ export const theme = createMuiTheme({
root: {
backgroundColor: colors.well,
},
input: {
color: colors.primary,
"&::placeholder": {
userSelect: "none",
color: colors.primarydark,
},
},
},
MuiInput: {
root: {
backgroundColor: colors.well,
borderBottomColor: "#fff",
},
underline: {
"&:hover:before": {
borderBottomColor: colors.primarydark,
},
"&:before": {
borderBottomColor: colors.primary,
},
"&:after": {
borderBottomColor: colors.primarylight,
},
},
},
MuiInputLabel: {
root: {
color: colors.primarydark, // why is this switched?
userSelect: "none",
"&:before": {
color: colors.primarylight,
},
},
},
MuiSelect: {
icon: {
color: colors.primary,
},
},
MuiMenu: {
list: {
backgroundColor: colors.well,
},
},
MuiMenuItem: {
root: {
color: colors.primary,
},
},
MuiAccordionSummary: {
root: {
backgroundColor: "#111",
},
},
MuiAccordionDetails: {
root: {
backgroundColor: "#000",
},
},
},
});