Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public showTextField() {
TNSFancyAlert.showTextField(
"Enter your name",
"",
new TNSFancyAlertButton({
label: "Save",
action: (value: any) => {
console.log(`User entered ${value}`);
}
}),
undefined,
undefined,
"User Input?",
`Yeah, sure we can.`,
"Ok, lots of options."
);
}
showTextField(): void {
let initialValue = null;
TNSFancyAlert.showTextField('Enter your name', initialValue, new TNSFancyAlertButton({
label: "Done",
action: (value: any) => {
alert({
title: "User entered:",
message: value,
okButtonText: "Correct ;)"
});
}
}), undefined, undefined, "What's you name", ".. if you have one", "Dismiss");
}