ThakurBallary / react-native-radio-buttons-group

Simple, best and easy to use radio buttons for react native apps.
MIT License
248 stars 70 forks source link

How to Change borderColor #46

Closed muzz56 closed 1 year ago

muzz56 commented 1 year ago

Hi, I'm not able to change borderColor of the radio buttons. Can you please guide me on how to change it? Below is my code:

<RadioGroup radioButtons={radioButtons} onPress={onPressRadioButton} containerStyle={{alignSelf: 'flex-start'}} borderColor={'#E6A4AA'} />

ThakurBallary commented 1 year ago

We have to pass borderColor property to radioButton. Here is the working snack example

muzz56 commented 1 year ago

Okay. So if I have 5 radio buttons, I want the same borderColor for all. Do i have to write 5 times in every object?

ThakurBallary commented 1 year ago

Yes, you can run a loop for that. It's written in this way to have the flexibility to customize individual radio buttons. The thought process is that usually there will be very few radio buttons used.