Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public showSuccessCustomEffects() {
if (isIOS) {
TNSFancyAlert.showAnimationType =
TNSFancyAlert.SHOW_ANIMATION_TYPES.SlideInFromLeft;
TNSFancyAlert.hideAnimationType =
TNSFancyAlert.HIDE_ANIMATION_TYPES.SlideOutToRight;
TNSFancyAlert.backgroundType = TNSFancyAlert.BACKGROUND_TYPES.Blur;
TNSFancyAlert.soundURL = "bell.mp3";
TNSFancyAlert.showSuccess(
"Sound?",
"You can use sound and customize many aspects like animation in/out, color, background style and much more.",
"Amazing!"
);
this.reset();
}
}
showSuccess(): void {
TNSFancyAlert.showSuccess("Success!", "You were able to press a button. Impressive stuff mate!", "Thanks :)");
}
public showCustomWidth() {
TNSFancyAlert.showSuccess(
"Success!",
"This uses a custom width of 300.",
`Oh that's nice.`,
0,
300
);
}
public showSuccessDelay() {
TNSFancyAlert.showSuccess(
"Success!",
"Fancy alerts are nice. This will disappear in 5 seconds.",
"Close Now!",
5
);
}
public showSuccess() {
TNSFancyAlert.showSuccess(
"Success!",
"Fancy alerts are nice.",
"Yes they are!"
);
}