Merge pull request #13305 from s0x/uikit-modal-options

Uikit support modal options
This commit is contained in:
Andy
2016-12-14 12:31:28 -08:00
committed by GitHub
5 changed files with 281 additions and 323 deletions
-2
View File
@@ -1,2 +0,0 @@
tsconfig.json
.idea/
+245 -318
View File
File diff suppressed because it is too large Load Diff
+19
View File
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"uikit-tests.ts"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "../tslint.json"
}
+14 -3
View File
@@ -2,9 +2,20 @@
function testModal() {
UIkit.modal.alert("Attention!");
UIkit.modal.confirm("Are you sure?", function () {
// will be executed on confirm.
});
let options: UIkit.ModalOptions = {
keyboard: true,
bgclose: true,
minScrollHeight: 150,
center: false,
modal: true
};
UIkit.modal.confirm("Are you sure?", () => {});
UIkit.modal.confirm("Are you sure?", () => {}, {});
UIkit.modal.confirm("Are you sure?", () => {}, () => {});
UIkit.modal.confirm("Are you sure?", () => {}, () => {}, {});
UIkit.modal.confirm("Are you sure?", () => {}, {});
UIkit.modal.prompt("Name:", 'value', function (newvalue:string) {
// will be executed on submit.
});