
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
nativescript-cfalert-dialog
Advanced tools
This plugin is a wrapper around CFAlertDialog
for Android and CFAlertViewController
.
tns plugin add nativescript-cfalert-dialog
no configuration step involved
NativeScript Core with { TypeScript } (works on Core, Angular and Vue as well)
import { CFAlertDialog,
DialogOptions,
CFAlertGravity,
CFAlertActionAlignment,
CFAlertActionStyle,
CFAlertStyle } from 'nativescript-cfalert-dialog';
let cfalertDialog = new CFAlertDialog();
let options: DialogOptions = {
// Options go here
dialogStyle: CFAlertStyle.ALERT,
title: "This is cool!",
}
cfalertDialog.show(options); // That's about it ;)
show(options): Promise<string>;
Shows the CFAlert Dialog based on the options provided. It returns a promise which can either resolve with a button title (if button was clicked), or it can resolve empty (undefined).
dismiss(animate:boolean): void;
Dismiss the CFAlert Dialog (animate option effective on iOS only)
// Everything that has '?' is optional
export interface DialogOptions {
dialogStyle: CFAlertStyle;
title: string;
titleColor?: string,
message?: string;
messageColor?: string;
textColor?: string;
textAlignment?: CFAlertGravity;
backgroundColor?: string,
backgroundBlur?: string, // iOS only
cancellable?: boolean,
headerView?: any, // nativeView
footerView?: any, // nativeView
onDismiss?: Function, // calback for dismiss, function (dialog)
buttons?: [{
text: string, // title
buttonStyle: CFAlertActionStyle,
buttonAlignment?: CFAlertActionAlignment,
textColor?: string,
backgroundColor?: string,
onClick: Function // function (buttonName)
}],
simpleList?: { // android only
items: [string],
onClick: Function // function(dialogInterface, index)
},
singleChoiceList?: { // android only
items: [string],
selectedItem: number,
onClick: Function // function(dialogInterface, index)
},
multiChoiceList?: { // android only
items: [string],
selectedItems: [boolean], // should have same number of elements as 'items'
onClick: Function // function (dialogInterface, index, b)
}
}
Apache License Version 2.0, January 2004
FAQs
CFAlert Dialog wrapper for NativeScript
The npm package nativescript-cfalert-dialog receives a total of 11 weekly downloads. As such, nativescript-cfalert-dialog popularity was classified as not popular.
We found that nativescript-cfalert-dialog demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.