Hey everyone, I’ve been attempting to customize the Material-UI radio button using CSS modules but haven’t had much luck. It seems like the easiest solution would be to use the makeStyles function from Material-UI, however, I am required to work with CSS modules.
This is the standard Material-UI radio button:
https://i.sstatic.net/Hh6gu.png
I need to create this instead: https://i.sstatic.net/cwSTU.png.
Although Material-UI doesn't provide a check mark option, I believe I can achieve it with SVG. However, I’m struggling to figure out how to implement it. Any guidance or assistance would be greatly appreciated.
UPDATE: I realized that I could insert an SVG as a component using the Radio component's checkedIcon property, which I found in the Material-UI icons documentation here.
While this took care of my needs for the checked 'Active' state, I faced difficulties creating the 'Hover' effect. Initially, I thought I needed an SVG for this as well, only to realize that I could simply draw a circle using ::before or ::after as a pseudo element and style it to fit within the main circle, same goes for the 'Focus' state.