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 align left the radio button #45

Closed alickcai closed 1 year ago

alickcai commented 1 year ago

I have all items aligned left but radio button since thers is some space between left border and small circle of radio button. Is there any setting to align the button left, i.e. get rid of small space mentioned above...thanks

ThakurBallary commented 1 year ago

Did you try adding containerStyle ? Also I suggest you to share a screenshot to understand the problem better and I can come up with a working solution.

ThakurBallary commented 1 year ago

Closed because of no activity. Please reopen the issue if further help is needed.

cseelus commented 1 year ago

Just use

            <RadioGroup
              containerStyle={{ alignSelf: 'flex-start', alignItems: 'left'}}
              …
            />
JamesIde commented 1 year ago
alignItems: 'left'

Crashes my app when RadioGroup is embedded in a modal In order to align the radio group to the left, I did this:

<View style={{alignSelf: "flex-start", alignItems: "flex-start" }}>
            <RadioGroup
              radioButtons={radioButtons}
              containerStyle={{
                borderWidth: 0.2, // demonstration for image below
              }}/>
          </View>

@ThakurBallary Here is what OP probably wanted clarification on: image See that border between the radio button the border? That seems unremovable. This should be reopened IMO

ThakurBallary commented 1 year ago

@JamesIde Try like this Expo Snack. You have to uncomment line 12 to see your expected output.