You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yarn add react-native-safe-area-context
pod install
For Expo project:
expo install react-native-safe-area-context
Usage
import{ALERT_TYPE,Dialog,AlertNotificationRoot,Toast}from'react-native-alert-notification';<AlertNotificationRoot><View>
// dialog box with single button
<Buttontitle={'dialog box'}onPress={()=>Dialog.show({type: ALERT_TYPE.SUCCESS,title: 'Success',textBody: 'Congrats! this is dialog box success',button: 'close',})}/>
// dialog box with cancel &confirmbuttons<Buttontitle={'confirmation dialog'}onPress={()=>Dialog.show({type: ALERT_TYPE.WARNING,title: 'Confirm Action',textBody: 'Are you sure you want to proceed with this action?',cancelButton: 'Cancel',confirmButton: 'Proceed',onPressCancel: ()=>console.log('Action cancelled'),onPressConfirm: ()=>console.log('Action confirmed'),})}/>
// toast notification
<Buttontitle={'toast notification'}onPress={()=>Toast.show({type: ALERT_TYPE.SUCCESS,title: 'Success',textBody: 'Congrats! this is toast notification success',paddingTop: 45,// custom top padding})}/></View></AlertNotificationRoot>;
Documentation:
Root Component
A React node that will be most likely wrapping your whole app.