diff --git a/packages/yoroi-extension/app/components/common/Select.js b/packages/yoroi-extension/app/components/common/Select.js index 80514183af..2b66d41df0 100644 --- a/packages/yoroi-extension/app/components/common/Select.js +++ b/packages/yoroi-extension/app/components/common/Select.js @@ -16,6 +16,7 @@ type Props = {| labelProps?: Object, helperText?: string, options: Array, + maxHeight?: string, |}; function Select({ @@ -28,6 +29,7 @@ function Select({ shrink, disabled, labelProps, + maxHeight, ...props }: Props): Node { const theme = useTheme(); @@ -53,9 +55,6 @@ function Select({ onChange={e => onChange(e.target.value)} onClose={handleClose} onOpen={handleOpen} - sx={{ - boxShadow: open ? theme.palette.ds.light_shadow_dropdown_menu : 'unset', - }} MenuProps={{ anchorOrigin: { vertical: 'bottom', @@ -65,6 +64,13 @@ function Select({ vertical: 'top', horizontal: 'left', }, + sx: { + '& .MuiMenu-paper': { + maxHeight: maxHeight != null ? maxHeight : '500px', + borderRadius: '8px', + boxShadow: open ? theme.palette.ds.light_shadow_dropdown_menu : 'unset', + }, + }, ...(menuProps !== null && menuProps), }} {...props} diff --git a/packages/yoroi-extension/app/components/common/autocomplete/Autocomplete.js b/packages/yoroi-extension/app/components/common/autocomplete/Autocomplete.js index f3bb9c9089..04f1203539 100644 --- a/packages/yoroi-extension/app/components/common/autocomplete/Autocomplete.js +++ b/packages/yoroi-extension/app/components/common/autocomplete/Autocomplete.js @@ -246,7 +246,7 @@ const ULList = styled(Box)(({ theme, isOpen }) => ({ outline: '0', transition: 'opacity .1s ease', borderRadius: 0, - boxShadow: isOpen ? theme.palette.ds.light_shadow_dropdown_menu : 'unset', + boxShadow: isOpen ? theme.palette.ds.light_shadow_dropdown_words : 'unset', })); const InputWrapper = styled(Box)( diff --git a/packages/yoroi-extension/app/components/settings/categories/general-setting/UnitOfAccountSettings.js b/packages/yoroi-extension/app/components/settings/categories/general-setting/UnitOfAccountSettings.js index 89bb9aa2b2..19911a71bc 100644 --- a/packages/yoroi-extension/app/components/settings/categories/general-setting/UnitOfAccountSettings.js +++ b/packages/yoroi-extension/app/components/settings/categories/general-setting/UnitOfAccountSettings.js @@ -169,13 +169,7 @@ export default class UnitOfAccountSettings extends Component { {...coinPriceCurrencyId.bind()} onChange={this.props.onSelect} value={currentValue} - menuProps={{ - sx: { - '& .MuiMenu-paper': { - maxHeight: '280px', - }, - }, - }} + maxHeight='280px' renderValue={value => (