Navalex
Navalex

Reputation: 266

React MUI input border color variable

I'm using MUI, and it styling solution (JSS) for my website. I was wondering if is there a variable in the theme object (or function ?) to get the basic input (TextField for exemple) border color, it's basicly rgba(0, 0, 0, 0.28) or equivalent in white, but can't find it in the default theme.

Thanks

Upvotes: 2

Views: 600

Answers (1)

Ryan Cogswell
Ryan Cogswell

Reputation: 81156

It isn't in the theme, it is hard-coded in OutlinedInput:

const borderColor = theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';

and then used for the notchedOutline styles:

    /* Styles applied to the `NotchedOutline` element. */
    notchedOutline: {
      borderColor,
    },

Upvotes: 1

Related Questions