Skip to content

Commit cb238bb

Browse files
committed
Use phoebusTheme as default instead of the MUI default
1 parent eee708e commit cb238bb

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/ui/widgets/EmbeddedDisplay/embeddedDisplay.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ import { GroupBoxComponent } from "../GroupBox/groupBox";
2424
import { useOpiFile } from "./useOpiFile";
2525
import { useId } from "react-id-generator";
2626
import { getOptionalValue, trimFromString } from "../utils";
27-
import { Theme, ThemeProvider, useTheme } from "@mui/material";
27+
import { Theme, ThemeProvider } from "@mui/material";
28+
import { phoebusTheme } from "../../../phoebusTheme";
2829

2930
const RESIZE_STRINGS = [
3031
"scroll-widget",
@@ -54,9 +55,6 @@ export const EmbeddedDisplay = (
5455
props: InferWidgetProps<typeof EmbeddedDisplayProps> &
5556
EmbeddedDisplayPropsExtra
5657
): JSX.Element => {
57-
// Use this to grab MUI's default theme
58-
const theme = useTheme();
59-
6058
const description = useOpiFile(props.file);
6159
const id = useId();
6260
let resize = props.resize || "scroll-content";
@@ -216,7 +214,7 @@ export const EmbeddedDisplay = (
216214

217215
if (props.border?.style === BorderStyle.GroupBox) {
218216
return (
219-
<ThemeProvider theme={props.theme ?? theme}>
217+
<ThemeProvider theme={props.theme ?? phoebusTheme}>
220218
<MacroContext.Provider value={embeddedDisplayMacroContext}>
221219
<GroupBoxComponent name={resolvedName} styleOpt={0}>
222220
{component}
@@ -226,7 +224,7 @@ export const EmbeddedDisplay = (
226224
);
227225
} else {
228226
return (
229-
<ThemeProvider theme={props.theme ?? theme}>
227+
<ThemeProvider theme={props.theme ?? phoebusTheme}>
230228
<MacroContext.Provider value={embeddedDisplayMacroContext}>
231229
{component}
232230
</MacroContext.Provider>

0 commit comments

Comments
 (0)