@@ -24,7 +24,8 @@ import { GroupBoxComponent } from "../GroupBox/groupBox";
2424import { useOpiFile } from "./useOpiFile" ;
2525import { useId } from "react-id-generator" ;
2626import { 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
2930const 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