react-native-styled-toast
react-native-styled-toast copied to clipboard
Exported onClose function
When having a custom onPress action on the toast, would be nice to be able to call directly onClose function, instead of clicking the "close" button for it
e.g.
toast({
duration: 4000,
message: `Moved to ${toFolder.title}`,
iconName: 'check',
iconColor: 'closeIconColor',
accentColor: 'success',
subMessage: 'View folder',
onPress: () => {
customAction()
onToastDismiss();
}
});
Hi @durdevic, you shouldn't need to close the Toast as the onClose
gets called when you trigger the onPress
Hi 👋 Somehow for me it just get's minimised and persists until the duration is over.
I am navigating to another screen with react-native-navigation. Could that perhaps cause a problem?
Example: