Closed HimanshuCF closed 1 year ago
Hey really loved the library and its simplicity. I was just wondering how to autohide the toast after few seconds.
showToastable({ message: 'react-native-heroes', alwaysVisible: true, animationInTiming: 1000, animationOutTiming: 1000, backgroundColor: 'red', duration: 2000, contentStyle: { marginHorizontal: 20, }, onPress: () => { console.log('onPress'); }, status: 'success', swipeDirection: 'left', })
<Toastable containerStyle={{ marginHorizontal: 20 }} alwaysVisible animationInTiming={2000} animationOutTiming={2000} duration={5000} onToastableHide={() => { console.log('onToastableHide'); }} statusMap={{ success: 'green', danger: 'red', info: 'blue', warning: 'yellow', }} renderContent={(props) => <ToastableBody {...props} />} swipeDirection={['left', 'right']} />
@HimanshuCF Hello, thanks. If you remove alwaysVisible param it will hide automatically based on duration
Hey really loved the library and its simplicity. I was just wondering how to autohide the toast after few seconds.
showToastable({ message: 'react-native-heroes', alwaysVisible: true, animationInTiming: 1000, animationOutTiming: 1000, backgroundColor: 'red', duration: 2000, contentStyle: { marginHorizontal: 20, }, onPress: () => { console.log('onPress'); }, status: 'success', swipeDirection: 'left', })