Skip to content

Commit

Permalink
Apply same styling as Autocomplete has to Selects
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
myarmolinsky committed Oct 22, 2024
1 parent 18e19ce commit 8d94bad
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/DropDownButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,11 @@ export const MenuItemWithTracking: React.FC<MenuItemWithTrackingProps> = ({

return (
<Tooltip {...tooltipProps}>
<MenuItem {...menuItem} onClick={handleClick}>
<MenuItem
{...menuItem}
onClick={handleClick}
data-custom-class="balena_DropDownButton_MenuItem"
>
{children}
</MenuItem>
</Tooltip>
Expand Down
19 changes: 19 additions & 0 deletions src/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,25 @@ export const theme = createTheme({
}),
},
},
MuiPopover: {
styleOverrides: {
root: ({ theme }) => ({
'.MuiMenu-list': {
paddingTop: 0,
paddingBottom: 0,

'> .MuiMenuItem-root:not([data-custom-class="balena_DropDownButton_MenuItem"])':
{
paddingTop: theme.spacing(3),
paddingBottom: theme.spacing(3),
'&:not(:last-of-type)': {
borderBottom: `1px solid ${color.border.subtle.value}`,
},
},
},
}),
},
},
MuiToggleButtonGroup: {
defaultProps: {
color: 'secondary',
Expand Down

0 comments on commit 8d94bad

Please sign in to comment.