Вот ожидаемый результат:
![enter image description here](https://i.stack.imgur.com/khNHn.png)
![enter image description here](https://i.stack.imgur.com/dQzVz.png)
Вот как я это сделалдо сих пор:
![enter image description here](https://i.stack.imgur.com/CUixn.png)
Что я не могу сделать, так это поставить значок SVG справа;следующий текст, вот проверенный результат:
![enter image description here](https://i.stack.imgur.com/4GFtA.png)
Более того, я получил точную черную линию, когда мой курсор перекрывает элемент.
![enter image description here](https://i.stack.imgur.com/KtiFl.png)
А вот мой код:
<MuiThemeProvider theme={createMuiTheme({
overrides: {
MuiSelect: {
'root': { display: 'flex',
alignItems: 'center'
}
},
MuiInput: {
'&:hover': {
borderBottom: '0px',
borderColor: 'transparent'
},
underline: {
'&:after': {
borderBottom: '0px',
borderColor: 'transparent'
},
'&:hover': {
borderBottom: '0px',
borderColor: 'transparent'
}
}
}
}
})}>
<Select
IconComponent={newIcon}
color={'#f1f1f1'}
autoWidth={false}
inputStyle={{
borderBottom: '0px',
color: '#2d2d2d',
fontFamily: 'Lato',
fontWeight: 'bold',
fontSize: '16px',
lineHeight: '19px',
}}
style={{
borderBottom: 'none',
backgroundColor: '#f1f1f1',
padding: '12px',
width: '93px'
}}
value={0}
>
<MenuItem value={0} style={{
color: '#2d2d2d',
fontFamily: 'Lato',
fontWeight: 'bold',
fontSize: '16px',
lineHeight: '19px',
}}>+852</MenuItem>
<MenuItem value={1} style={{
color: '#2d2d2d',
fontFamily: 'Lato',
fontWeight: 'bold',
fontSize: '16px',
lineHeight: '19px'
}}>+86</MenuItem>
</Select>
</MuiThemeProvider>
и вот мой значок:
const newIcon = (props) => {
return (
<SvgIcon>
<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45" viewBox="0 0 45 45">
<path fill="none" fill-rule="evenodd" stroke="#979797" stroke-width="2" d="M17 20l5.467 5.467L27.934 20"/>
</svg>
</SvgIcon>
)
};
Не могли бы вы посоветовать, как правильно расположить иконку и как избавиться от нижней строки?Спасибо.