From 453eb9e29ea90370f6c149fdc1029fdba9469f19 Mon Sep 17 00:00:00 2001 From: Ruslan Lesiutin Date: Fri, 12 Apr 2024 17:12:10 +0100 Subject: [PATCH] feat[devtools-fusebox]: support theme option --- packages/react-devtools-fusebox/src/frontend.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/react-devtools-fusebox/src/frontend.js b/packages/react-devtools-fusebox/src/frontend.js index 7f5e30a93a412..617e9e25a7bd9 100644 --- a/packages/react-devtools-fusebox/src/frontend.js +++ b/packages/react-devtools-fusebox/src/frontend.js @@ -13,7 +13,10 @@ import Bridge from 'react-devtools-shared/src/bridge'; import Store from 'react-devtools-shared/src/devtools/store'; import DevTools from 'react-devtools-shared/src/devtools/views/DevTools'; -import type {Wall} from 'react-devtools-shared/src/frontend/types'; +import type { + BrowserTheme, + Wall, +} from 'react-devtools-shared/src/frontend/types'; import type {FrontendBridge} from 'react-devtools-shared/src/bridge'; type Config = { @@ -42,18 +45,20 @@ export function createStore(bridge: FrontendBridge, config?: Config): Store { type InitializationOptions = { bridge: FrontendBridge, store: Store, + theme?: BrowserTheme, }; export function initialize( contentWindow: Element | Document, options: InitializationOptions, ): void { - const {bridge, store} = options; + const {bridge, store, theme = 'light'} = options; const root = createRoot(contentWindow); root.render(