diff --git a/package.json b/package.json index 54dd805..8d0f948 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "dependencies": { "prop-types": "^15.7.2", "react-native-pose": "^0.9.1", - "react-native-status-bar-height": "^2.5.0" + "react-native-status-bar-height": "^2.5.0", + "react-native-vector-icons": "^8.1.0" }, "devDependencies": { "@types/react": "^16.8.13", diff --git a/src/Alert/Alert.js b/src/Alert/Alert.js index da4b355..3e1e2ad 100644 --- a/src/Alert/Alert.js +++ b/src/Alert/Alert.js @@ -15,6 +15,7 @@ import posed from "react-native-pose"; //Mics Constants import { styles } from "./AlertStyle"; import { Colors, Constants, Images, Responsive } from "../Theme"; +import Icon from 'react-native-vector-icons/FontAwesome5'; //Pose View let Modal = posed.View({ @@ -25,7 +26,7 @@ let Modal = posed.View({ ease: "linear", duration: 500, type: "spring", - stiffness: 30, + // stiffness: 30, }, }, }, @@ -36,7 +37,7 @@ let Modal = posed.View({ ease: "linear", duration: 500, type: "spring", - stiffness: 30, + // stiffness: 30, }, }, }, @@ -227,10 +228,10 @@ class RNAlerter extends Component { //onPress Method onPressAlertView = () => { const { onPressAlert, alertLoadingVisible, alertTapToDismiss } = this.props; - const { alertTitle } = this.state; - if (alertTapToDismiss && !alertLoadingVisible && alertTitle.length <= 0) { + // const { alertTitle } = this.state; + if (alertTapToDismiss && !alertLoadingVisible) { this.onHideAlert(); - } else if (!alertLoadingVisible && alertTitle.length <= 0 && onPressAlert) { + } else if (!alertLoadingVisible && onPressAlert) { onPressAlert(); } }; @@ -267,6 +268,7 @@ class RNAlerter extends Component { alertIconVisible, alertLoadingVisible, alertIconSource, + alertVectorIcon, alertIconSize, alertAnimatedIcon, alertIconTintColor, @@ -313,17 +315,28 @@ class RNAlerter extends Component { pose={ alertAnimatedIcon ? (isBig ? "big" : "normal") : "normal" } - > - { + alertVectorIcon ? + + : + } ) )} @@ -400,6 +413,7 @@ RNAlerter.propTypes = { alertIconVisible: PropTypes.bool, alertLoadingVisible: PropTypes.bool, alertIconSource: Image.propTypes.source, + alertVectorIcon: PropTypes.object, alertIconSize: PropTypes.number, alertIconTintColor: PropTypes.string, alertIconResizeMode: PropTypes.oneOf([ @@ -457,6 +471,7 @@ RNAlerter.defaultProps = { alertTitle: "", alertMessage: "", alertIconSource: Images.bell, + alertVectorIcon: null, alertIconSize: 24, alertIconTintColor: "", alertIconResizeMode: Constants.center,