react-select
react-select copied to clipboard
[v2] hover style
How to change styles on hover without use class names?
issue solved
const customStyles = {
control: base => ({
...base,
borderColor: 'gray',
'&:hover': {
borderColor: 'red'
}
})
}
@berikiushi would it be good to add this to the docs site? I had to dig to find this.
just added this in PR #3185
for V3, remove the &
const customStyles = {
control: base => ({
...base,
borderColor: 'gray',
':hover': {
borderColor: 'red'
}
})
}
control: (provided: any, state: any) => ({
...provided,
border: state.isFocused ? 'none' : '1px solid #edeff8',
borderRadius: '0',
height: '51px',
cursor: 'pointer',
':hover': {
border: '1px solid #ED3E49'
}
}),