I am using mui withstyle method to style a radio button. I want to pass a color as a parameter to the withstyle method to be used in the style object as I have shown below. Is there any way I can achieve that.
This is the custom component. I want to pass the color like this and use it in the style object or something similar to that.
export const CustomRadio = withStyles((theme, customColor) => ({
root: {
"& svg": {
width: "22px",
height: "22px",
},
"&$checked": {
color: customColor,
},
"&:hover": {
backgroundColor: "transparent",
},
},
checked: {},
}))((props) => <Radio {...props} />);
This is how I wanna render the component while passing the color.
<CustomRadio color="red" />
Thanks in advance.