Sava
Sava

Reputation: 133

How to change color on radio button material-ui

import { createMuiTheme, ThemeProvider } from "@material-ui/core";

const theme = createMuiTheme({
  palette: {
    primary: {
      main: "#5E9C60",
    },
  },
});

const RadioButton = ({ category, handlerForCategory }) => {
  return (
    <ThemeProvider theme={theme}>
      <RadioGroup
        value={category}
        onChange={(e) => handlerForCategory(e.target.value)}
      >
        <FormControlLabel
          value="Eating out"
          control={<Radio />}
          
        />

i what to change red color to green color on readio button, and i do not know how, i little use a createMuiTheme but did't wrok

Upvotes: 0

Views: 2083

Answers (1)

Domino987
Domino987

Reputation: 8774

You need to set the color of the radio to be primary to match the primary color from the theme.

control={<Radio color='primary'/>}

Upvotes: 1

Related Questions