Move vertical alignment styling from component to theme level
- Move MuiSelect vertical alignment from FilterHeader component to globalTheme.js - Ensures consistent vertical alignment for all Select components application-wide - Removes component-specific styling in favor of theme-level consistency - Addresses reviewer feedback to make this a theme-level change Components already with custom Select styling will continue to work as local styles override theme styles.
This commit is contained in:
1 parent
a6d445818f
commit
5e5daef49a
2 files changed
+4
-6
No files matched your search
@@ -37,12 +37,6 @@ const FilterHeader = ({ header, options, value, onChange, multiple = true }) =>
|
|||||||
displayEmpty
|
displayEmpty
|
||||||
value={controlledValue}
|
value={controlledValue}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
sx={{
|
|
||||||
"& .MuiSelect-select": {
|
|
||||||
display: "flex",
|
|
||||||
alignItems: "center",
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
renderValue={(selected) => {
|
renderValue={(selected) => {
|
||||||
if (!selected?.length) {
|
if (!selected?.length) {
|
||||||
return header;
|
return header;
|
||||||
|
|||||||
@@ -564,6 +564,10 @@ const baseTheme = (palette) => ({
|
|||||||
"& .MuiSelect-icon": {
|
"& .MuiSelect-icon": {
|
||||||
color: theme.palette.primary.contrastTextSecondary, // Dropdown + color
|
color: theme.palette.primary.contrastTextSecondary, // Dropdown + color
|
||||||
},
|
},
|
||||||
|
"& .MuiSelect-select": {
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
},
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
backgroundColor: theme.palette.primary.main, // Background on hover
|
backgroundColor: theme.palette.primary.main, // Background on hover
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user