user944513
user944513

Reputation: 12729

how to change border color in react?

Could you please tell me How to make border red in react ui material ? Here is my code https://codesandbox.io/s/942m24jl0y

Currently when I focus my input field it show border in blue color

enter image description here

I already added these lines

underlineInput: {
        '&:before': {
            borderBottom: '1px solid #777777'
        },
        '&:after': {
            borderBottom: `2px solid #777777`
        },
        '&:hover:not($disabled):not($focused):not($error):before': {
            borderBottom: `2px solid #777777`
        }
    },

I want to change border color to red

Upvotes: 0

Views: 2934

Answers (1)

Bohdan Didukh
Bohdan Didukh

Reputation: 1306

Add classNamePrefix="my-select" to your Select component: <Select classNamePrefix="my-select"/>

and add next styles to your styles.css file .my-select__input{ color: red;}.

Upvotes: 1

Related Questions