1.0.11 • Published 4 years ago

@logisticinfotech/react-native-animated-alert v1.0.11

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

react-native-animated-alert

Installation and Usage

Please check this blog for detail usage this link

Simple Usage

import Alert from '@logisticinfotech/react-native-animated-alert';

Below code will show and hide alert the simple alert.

onPressShow = () => {
    Alert.showAlert();
}

...

onPressHide = () => {
    Alert.hideAlert();
}

...

onAlertShow = () => {
    console.log(‘Alert is visible’)
}

onAlertHide = () => {
    console.log(‘Alert is hidden’)
}

...

render(){
    return(
        <View>
        ...
            <Alert
                alertTitle="Title"
                alertMessage="Message"
                onAlertShow={this.onAlertShow}
                onAlertHide={this.onAlertHide}
            />
        ...
        </View>
    )
}

npm.io npm.io

Basic Properties

PropDefaultTypeDescription
alertBGContainerStyle{}styleAlert main container style.
alertBGColor'#A9A9A9'stringAlert background color.
alertIconVisibletrueboolDisplay or hide alert icon side to title.
alertLoadingVisibletrueboolShow loading type alter.
alertIconSourcebellIconsourceChange the default bell icon. This will be not display id loading is visible.
alertIconSize24numbersize of the alter icon.
alertIconTintColor''stringcolor of the icon if source has transparent pixel.
alertIconResizeMode'center'enum of ['center','contain','cover','repeat','stretch']Image resize mode.
alertAnimatedIcontrueboolIcon of alert will be show animated.
alertAnimatedIconDuration200numberAnimation time duration of alert icon.
alertTitle''stringDisplay title of the alter.
alertTitleStyleInLibrarystyleStyle of alter title display.
alertMessage''stringDisplay message of the alter.
alertMessageStyleInLibrarystyleStyle of alter message display.
alertButtonTitle[]array(string)Display the alert button. max is 2 buttons. This will be not display id loading is visible.
alertButtonPosition'end'enum of ['start','center','end']Style of the non selected date or time.
alertButtonStyleInLibrarystyleStyle of the alert buttons.
alertButtonTextStyleInLibrarystyleStyle of text of the alert buttons .
alertAutoHidetrueboolAuto hide alter. This will be not display id loading is visible or button is visible
alertAutoHideDuration2000numberTime in millisecond after alter auto hide if it enable. This will be not display id loading is visible or button is visible
alertTapToDismissfalseboolHide alert on tap on it. This will be not display id loading is visible.
onPressAlert() => {}functionCall when click on the alter.
onPressButtonOne() => {}functionCall when button one(left button) is press.
onPressButtonTwo() => {}functionCall when button two(right button) is press if has two buttons.
onAlertShow() => {}functionCall when alert is visible.
onAlertHide() => {}functionCall when alert is hide.
1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago