Load ant theme in classic Flipper as well

Summary: If a new code path uses some Ant design based components in classic flipper, they are unstyled before this diff. By making sure that the ant stylesheet is loaded we can safely 'leak' new UI elements into the old UI. For example when we use toasters, dialogs etc.

Reviewed By: cekkaewnumchai

Differential Revision: D24021751

fbshipit-source-id: 3b42d28f1c75e4df441170660027562264e879dd
This commit is contained in:
Michel Weststrate
2020-10-01 05:32:07 -07:00
committed by Facebook GitHub Bot
parent 650158ca35
commit 4e6ecac43e
4 changed files with 5 additions and 19 deletions

View File

@@ -106,11 +106,9 @@ function init() {
store,
{name: 'loadTheme', fireImmediately: true, throttleMs: 500},
(state) =>
state.settingsState.enableSandy
? state.settingsState.darkMode
? 'themes/dark'
: 'themes/light'
: 'none',
state.settingsState.enableSandy && state.settingsState.darkMode
? 'themes/dark'
: 'themes/light',
(theme) => {
(document.getElementById(
'flipper-theme-import',