Skip to content

Commit

Permalink
Fix Select dropdown styles
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinkipruto committed Dec 4, 2024
1 parent 5600686 commit 855de64
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function CategoryHeader({ title, description, icon, ...props }) {
return null;
}
return (
<div>
<Box>
<Typography
{...props}
variant="h3"
Expand Down Expand Up @@ -48,7 +48,7 @@ function CategoryHeader({ title, description, icon, ...props }) {
{description}
</Typography>
)}
</div>
</Box>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,10 @@ function ChartFilter({
}}
MenuProps={{
"& .MuiMenu-paper": {
height: theme.typography.pxToRem(310),
maxHeight: theme.typography.pxToRem(310),
boxShadow: "none",
},
"& .MuiMenu-list": {
padding: `${theme.typography.pxToRem(10)} 0 ${theme.typography.pxToRem(
10,
)} ${theme.typography.pxToRem(15)} !important`,
borderRadius: 0,
marginTop: theme.typography.pxToRem(5),
},
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,6 @@ function PinAndCompare({
height: theme.typography.pxToRem(310),
boxShadow: "none",
},
"& .MuiMenu-list": {
padding: `${theme.typography.pxToRem(10)} 0 ${theme.typography.pxToRem(
10,
)} ${theme.typography.pxToRem(15)} !important`,
},
}}
/>
</Grid>
Expand Down
14 changes: 13 additions & 1 deletion apps/climatemappedafrica/src/components/Select/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,18 @@ function Input({
borderRadius: "0",
},
},
"& .MuiMenu-list": {
paddingTop: 0,
paddingBottom: 0,
"& li": {
fontWeight: 400,
paddingTop: typography.pxToRem(12),
paddingBottom: typography.pxToRem(12),
},
"& li.Mui-selected": {
fontWeight: "bold",
},
},
...MenuProps,
}),
anchorOrigin: {
Expand All @@ -130,7 +142,7 @@ function Input({
background: palette.background.paper,
color: "#959696",
borderStyle: "none",
borderRadius: 2,
borderRadius: typography.pxToRem(2),
paddingBottom: typography.pxToRem(15),
paddingTop: typography.pxToRem(15),
fontSize: `${typography.caption.fontSize} !important`,
Expand Down

0 comments on commit 855de64

Please sign in to comment.