react-select icon indicating copy to clipboard operation
react-select copied to clipboard

[v2] hover style

Open berikiushi opened this issue 8 years ago • 5 comments

How to change styles on hover without use class names?

berikiushi avatar Jul 03 '18 23:07 berikiushi

issue solved

const customStyles = {
  control: base => ({
    ...base,
    borderColor: 'gray',

    '&:hover': {
      borderColor: 'red'
    }
  })
}

berikiushi avatar Jul 03 '18 23:07 berikiushi

@berikiushi would it be good to add this to the docs site? I had to dig to find this.

brainbrian avatar Nov 07 '18 00:11 brainbrian

just added this in PR #3185

berikiushi avatar Nov 07 '18 18:11 berikiushi

for V3, remove the &

const customStyles = {
  control: base => ({
    ...base,
    borderColor: 'gray',

    ':hover': {
      borderColor: 'red'
    }
  })
}

gtdeng avatar Dec 02 '20 01:12 gtdeng

control: (provided: any, state: any) => ({
        ...provided,
        border: state.isFocused ? 'none' : '1px solid #edeff8',
        borderRadius: '0',
        height: '51px',
        cursor: 'pointer',
        ':hover': {
            border: '1px solid #ED3E49'
        }
    }),

olehbiletskyi avatar Feb 01 '22 15:02 olehbiletskyi