From 597730b629fc653858dc9fdbf69501376e949baf Mon Sep 17 00:00:00 2001 From: AdriSolid Date: Thu, 8 Apr 2021 12:25:18 +0200 Subject: [PATCH 1/2] feat: expose createTheme as createCartoTheme --- packages/react-ui/src/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react-ui/src/index.js b/packages/react-ui/src/index.js index 2519f9ab6..82af72e59 100644 --- a/packages/react-ui/src/index.js +++ b/packages/react-ui/src/index.js @@ -1,4 +1,4 @@ -import { cartoThemeOptions } from './theme/carto-theme'; +import { cartoThemeOptions, createTheme } from './theme/carto-theme'; import WrapperWidgetUI from './widgets/WrapperWidgetUI'; import CategoryWidgetUI from './widgets/CategoryWidgetUI'; import FormulaWidgetUI from './widgets/FormulaWidgetUI'; @@ -7,9 +7,10 @@ import PieWidgetUI from './widgets/PieWidgetUI'; export { cartoThemeOptions, + createTheme as createCartoTheme, WrapperWidgetUI, CategoryWidgetUI, FormulaWidgetUI, HistogramWidgetUI, - PieWidgetUI, + PieWidgetUI }; From dc5413b9f96a784da05b5d3f9017a78e798835c2 Mon Sep 17 00:00:00 2001 From: AdriSolid Date: Thu, 8 Apr 2021 15:50:18 +0200 Subject: [PATCH 2/2] fix: remove unsued createTheme parameter --- packages/react-ui/src/theme/carto-theme.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/react-ui/src/theme/carto-theme.js b/packages/react-ui/src/theme/carto-theme.js index 590fd0e48..bdca6657a 100644 --- a/packages/react-ui/src/theme/carto-theme.js +++ b/packages/react-ui/src/theme/carto-theme.js @@ -1175,16 +1175,10 @@ export const cartoThemeOptions = { } }; -export function createTheme(options = {}) { - const themeOptions = { - ...cartoThemeOptions, - ...options - }; - - let theme = createMuiTheme(themeOptions); - +export function createTheme() { + let theme = createMuiTheme(cartoThemeOptions); theme = responsiveFontSizes(theme, { - breakpoints: themeOptions.breakpoints.keys, + breakpoints: cartoThemeOptions.breakpoints.keys, disableAlign: false, factor: 2, variants: [