nativescript-custom-bottomsheet
Version:
Nativescript Custom Bottomsheet is a plugin that enable the show a custom beautiful actionsheet/bottomsheet.
25 lines • 1.05 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
var CustomBottomsheet = (function () {
function CustomBottomsheet() {
}
CustomBottomsheet.prototype.show = function (options) {
var titles = new Array();
var icons = new Array();
options.items.forEach(function (val) {
titles.push(val.title);
icons.push(val.icon);
});
var bottomSheet = LCActionSheet.sheetWithTitleMainIconIconArrayCancelButtonTitleClickedOtherButtonTitleArray(options.title, UIImage.imageNamed(options.icon), icons, options.cancelButtonText || 'Cancel', function (actionSheet, index) {
if (index === 0) {
options.onItemTap(-1, null);
return;
}
options.onItemTap(index - 1, options.items[index - 1]);
}, titles);
bottomSheet.show();
};
return CustomBottomsheet;
}());
exports.CustomBottomsheet = CustomBottomsheet;
//# sourceMappingURL=custom-bottomsheet.ios.js.map
;