sekizlipenguen / react-native-popup-confirm-toast

MIT License
90 stars 13 forks source link

No callback for cancel #3

Closed Standin-Alone closed 2 years ago

sekizlipenguen commented 2 years ago

Any chance to elaborate?

Standin-Alone commented 2 years ago

your callback function is for confirm button only. i can't get the cancel button callback

sekizlipenguen commented 2 years ago

Will this function be sufficient? I will bring a new update.

Uploading Screen Recording 2 ezgif-1-29d8589951

<TouchableOpacity onPress={() =>
                        Popup.show({
                            type: 'confirm',
                            title: 'Dikkat!',
                            textBody: 'Mutlak özgürlük, kendi başına hiçbir anlam ifade etmez. ',
                            buttonText: 'Tamam',
                            confirmText: 'Vazgeç',
                            callback: () => {
                                alert('Okey Callback && hidden');
                                Popup.hide();
                            },
                            cancelCallback: () => {
                                alert('Cancel Callback && hidden');
                                Popup.hide();
                            },
                        })
                    }
                >
                    <Text>Open Popup Confirm Message</Text>
</TouchableOpacity>
sekizlipenguen commented 2 years ago

https://www.npmjs.com/package/react-native-popup-confirm-toast

Your request was brought with version 2.0.6.