Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding cancel button #16

Closed
hosseinpro opened this issue Jan 22, 2019 · 2 comments
Closed

Adding cancel button #16

hosseinpro opened this issue Jan 22, 2019 · 2 comments

Comments

@hosseinpro
Copy link

Usually PIN code screens has a "cancel" option. How can I add a cancel button at bottom right corner?

@hosseinpro
Copy link
Author

I solved the problem by putting the PinView in another View (or Content in NativeBase).

render() { return ( <Modal animationType="slide" transparent={false} visible={this.state.visible} onRequestClose={() => { Alert.alert("Modal has been closed."); }} > <Content contentContainerStyle={{ flex: 1, alignContent: "center", justifyContent: "center" }} > <Text style={{ fontSize: 25, color: "red", alignSelf: "center", marginBottom: 20 }} > Enter Passcode </Text> <PinView onComplete={(val, clear) => { clear(); this.setState({ pinValue: val }); this.setState({ visible: false }); }} pinLength={4} /> <Button transparent style={{ alignSelf: "flex-end", marginRight: 60 }} onPress={() => this.setState({ visible: false })} > <Text style={{ fontSize: 16 }}>Cancel</Text> </Button> </Content> </Modal> ); }

screen shot 2019-01-22 at 2 52 15 pm

@talut
Copy link
Owner

talut commented Jan 23, 2019

Hi , I think your wish about Cancel button is for your Modal. Not PinView package. PinView package is not providing such this feature.

@talut talut closed this as completed Jan 23, 2019
Repository owner locked as off-topic and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants