From a2c25c333fbe2dd8c3df20c1b745d2ef127a21b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Arag=C3=B3n?= Date: Wed, 17 Mar 2021 18:53:51 +0100 Subject: [PATCH] Fix material-ui warnings due to wrong styles in theme (#124) Fix material-ui warnings due to wrong styles in theme --- CHANGELOG.md | 1 + packages/react-ui/src/theme/carto-theme.js | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d1be4eef..4e9331826 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Not released +- Fix material-ui warnings due to wrong styles in theme [#124](https://github.com/CartoDB/carto-react/pull/124) - Add Widgets from @carto/react-widgets to StoryBook [#120](https://github.com/CartoDB/carto-react/pull/120) - Improve GoogleMap component [#121](https://github.com/CartoDB/carto-react/pull/121) diff --git a/packages/react-ui/src/theme/carto-theme.js b/packages/react-ui/src/theme/carto-theme.js index 315c379cd..590fd0e48 100644 --- a/packages/react-ui/src/theme/carto-theme.js +++ b/packages/react-ui/src/theme/carto-theme.js @@ -649,7 +649,9 @@ export const cartoThemeOptions = { } }, MuiInputLabel: { - ...variables.typography.body1, + root: { + ...variables.typography.body1 + }, formControl: { transform: 'translate(16px, 20px) scale(1)', @@ -693,7 +695,7 @@ export const cartoThemeOptions = { marginBottom: spacing(1.5), color: variables.palette.text.secondary, - '&$disabled': { + '&:disabled': { color: variables.palette.action.disabled }, @@ -748,8 +750,10 @@ export const cartoThemeOptions = { MuiSelect: { selectMenu: {}, - '&$hover': { - backgroundColor: 'transparent' + root: { + '&:hover': { + backgroundColor: 'transparent' + } }, select: {