ttdung11t2 / react-native-confirmation-code-input

A react-native component to input confirmation code for both Android and IOS
MIT License
411 stars 349 forks source link

border type not working #7

Closed dagostal closed 6 years ago

dagostal commented 6 years ago

hi,

not sure if i am doing border type correct, i keep trying to change to underline but it says as a box

<CodeInput ref="codeInputRef1" space={10} size={30} inputPosition='center' activeColor='black' inactiveColor='black' codeInputStyle={{ borderWidth: 1.5 }} borderType='underline' autoFocus={false} onFulfill={(isValid, code) => alert(isValid)} />

ttdung11t2 commented 6 years ago

sorry about late response. this component doesn't have props "borderType" and I see InputText doesn't have this props too. If you want to make underline for input, you can apply some style for component. depend on your need, you can add some style on "codeInputStyle" or "containerStyle" props

dagostal commented 6 years ago

thank you!

wangxpert commented 6 years ago

I tried to use underline border style but it's not working.

<CodeInput ref="codeinput" className="border-b" keyboardType="numeric" activeColor="white" inactiveColor="white" inputPosition='left' cellBorderWidth={1} space={10} autoFocus={true} codeLength={4} size={60} onFulfill={(code) => this.verify(code)} containerStyle={{ marginTop: 50 }} codeInputStyle={{ color: "white", fontSize: 32 }} />

This is the code i used to implement and can you please give me the solution?

georgekuttygeorge commented 6 years ago

@zootopia106 make the cellBorderWidth props to reasonable value like cellBorderWidth={10}

<CodeInput ref="codeinput" className="border-b" keyboardType="numeric" activeColor="black" inactiveColor="red" inputPosition='left' cellBorderWidth={10} space={10} autoFocus={true} codeLength={4} size={60} onFulfill={(code) => this.verify(code)} containerStyle={{ marginTop: 50 }} codeInputStyle={{ color: "grey", fontSize: 32 }} />