Skip to content

Commit

Permalink
refactor: update name of theme
Browse files Browse the repository at this point in the history
  • Loading branch information
simcha90 committed Feb 1, 2021
1 parent 026907c commit 008d2d2
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions superset-frontend/src/SqlLab/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import setupApp from '../setup/setupApp';
import './main.less';
import '../../stylesheets/reactable-pagination.less';
import '../components/FilterableTable/FilterableTableStyles.less';
import { customTheme } from '../preamble';
import { theme } from '../preamble';

setupApp();

Expand Down Expand Up @@ -110,7 +110,7 @@ if (sqlLabMenu) {

const Application = () => (
<Provider store={store}>
<ThemeProvider theme={customTheme}>
<ThemeProvider theme={theme}>
<App />
</ThemeProvider>
</Provider>
Expand Down
4 changes: 2 additions & 2 deletions superset-frontend/src/addSlice/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import setupPlugins from '../setup/setupPlugins';
import { DynamicPluginProvider } from '../components/DynamicPlugins';
import AddSliceContainer from './AddSliceContainer';
import { initFeatureFlags } from '../featureFlags';
import { customTheme } from '../preamble';
import { theme } from '../preamble';

setupApp();
setupPlugins();
Expand All @@ -37,7 +37,7 @@ const bootstrapData = JSON.parse(
initFeatureFlags(bootstrapData.common.feature_flags);

const App = () => (
<ThemeProvider theme={customTheme}>
<ThemeProvider theme={theme}>
<DynamicPluginProvider>
<AddSliceContainer datasources={bootstrapData.datasources} />
</DynamicPluginProvider>
Expand Down
4 changes: 2 additions & 2 deletions superset-frontend/src/dashboard/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ import { DynamicPluginProvider } from 'src/components/DynamicPlugins';
import setupApp from '../setup/setupApp';
import setupPlugins from '../setup/setupPlugins';
import DashboardContainer from './containers/Dashboard';
import { customTheme } from '../preamble';
import { theme } from '../preamble';

setupApp();
setupPlugins();

const App = ({ store }) => (
<Provider store={store}>
<DndProvider backend={HTML5Backend}>
<ThemeProvider theme={customTheme}>
<ThemeProvider theme={theme}>
<DynamicPluginProvider>
<DashboardContainer />
</DynamicPluginProvider>
Expand Down
4 changes: 2 additions & 2 deletions superset-frontend/src/explore/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ import setupApp from '../setup/setupApp';
import setupPlugins from '../setup/setupPlugins';
import './main.less';
import '../../stylesheets/reactable-pagination.less';
import { customTheme } from '../preamble';
import { theme } from '../preamble';

setupApp();
setupPlugins();

const App = ({ store }) => (
<Provider store={store}>
<DndProvider backend={HTML5Backend}>
<ThemeProvider theme={customTheme}>
<ThemeProvider theme={theme}>
<DynamicPluginProvider>
<ExploreViewContainer />
<ToastPresenter />
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/preamble.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ setupColors(extraCategoricalColorSchemes, extraSequentialColorSchemes);
// Setup number formatters
setupFormatters();

export const customTheme = merge(
export const theme = merge(
supersetTheme,
bootstrapData?.common?.theme_overrides ?? {},
);
4 changes: 2 additions & 2 deletions superset-frontend/src/profile/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import messageToastReducer from '../messageToasts/reducers';
import { initEnhancer } from '../reduxUtils';
import setupApp from '../setup/setupApp';
import './main.less';
import { customTheme } from '../preamble';
import { theme } from '../preamble';

setupApp();

Expand All @@ -46,7 +46,7 @@ const store = createStore(

const Application = () => (
<Provider store={store}>
<ThemeProvider theme={customTheme}>
<ThemeProvider theme={theme}>
<App user={bootstrap.user} />
</ThemeProvider>
</Provider>
Expand Down
4 changes: 2 additions & 2 deletions superset-frontend/src/views/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import setupApp from '../setup/setupApp';
import setupPlugins from '../setup/setupPlugins';
import Welcome from './CRUD/welcome/Welcome';
import ToastPresenter from '../messageToasts/containers/ToastPresenter';
import { customTheme } from '../preamble';
import { theme } from '../preamble';

setupApp();
setupPlugins();
Expand All @@ -69,7 +69,7 @@ const store = createStore(

const App = () => (
<ReduxProvider store={store}>
<ThemeProvider theme={customTheme}>
<ThemeProvider theme={theme}>
<FlashProvider common={common}>
<Router>
<DynamicPluginProvider>
Expand Down
4 changes: 2 additions & 2 deletions superset-frontend/src/views/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { ThemeProvider } from '@superset-ui/core';
import Menu from 'src/components/Menu/Menu';
import { customTheme } from '../preamble';
import { theme } from '../preamble';

const container = document.getElementById('app');
const bootstrapJson = container?.getAttribute('data-bootstrap') ?? '{}';
const bootstrap = JSON.parse(bootstrapJson);
const menu = { ...bootstrap.common.menu_data };
const app = (
<ThemeProvider theme={customTheme}>
<ThemeProvider theme={theme}>
<Menu data={menu} />
</ThemeProvider>
);
Expand Down

0 comments on commit 008d2d2

Please sign in to comment.