Material-ui adding a link to the Radio Button component from the jet router

Hellou! I have 2 radio exchanges and I want to add a link. I tried to do it like this:

<RadioButton value="/searchByArtistAndName" label="Artist and Name" style={styles.radioButton} containerElement={<Link to="/searchByArtistAndName"/>} /> 

But for RadioButton, the containerElement element is not defined. Any idea?

+5
source share
1 answer

You can put any reaction component in the label property, not just a text string.

 <RadioButton label={<Link to="/your_route" />} ... /> 
+2
source

Source: https://habr.com/ru/post/1260102/


All Articles