sourav
sourav

Reputation: 61

Styling react-native-elements CheckBox Icon

I'm using CheckBox from the react-native-elements. In the Documentation, there are not any IconProps. there is IconRight style which I used but it only aligning the Icon from the right of the title but I want to align the Icon at the end of the View. here is the code -

        <CheckBox
                title={item}
                key={index}
                value={item}
                ref={item}
                checked={checked}
                iconRight
                iconType="material"
                checkedIcon="clear"
                uncheckedIcon="add"
                checkedColor="red"
                onPress={() => {
                    this.controlcheck(item, checked);
                }}
            />

please see the image

I want to align the + icon at the right of the end.

Upvotes: 2

Views: 2290

Answers (1)

Ghassane Aboughazaouat
Ghassane Aboughazaouat

Reputation: 300

You can use this :

<CheckBox
            title={<Text style={{flex:1}}>Hello World</Text>}
            
        />

Upvotes: 1

Related Questions