@capacitor/dialog
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.2.1](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/dialog@0.2.0...@capacitor/dialog@0.2.1) (2020-12-20) | ||
### Bug Fixes | ||
* support deprecated types from Capacitor 2 ([#139](https://github.com/ionic-team/capacitor-plugins/issues/139)) ([2d7127a](https://github.com/ionic-team/capacitor-plugins/commit/2d7127a488e26f0287951921a6db47c49d817336)) | ||
# [0.2.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/dialog@0.1.1...@capacitor/dialog@0.2.0) (2020-12-02) | ||
@@ -8,0 +19,0 @@ |
@@ -341,3 +341,4 @@ { | ||
], | ||
"enums": [] | ||
"enums": [], | ||
"typeAliases": [] | ||
} |
import type { DialogPlugin } from './definitions'; | ||
declare const Dialog: DialogPlugin; | ||
export * from './definitions'; | ||
export { Dialog }; |
@@ -5,3 +5,4 @@ import { registerPlugin } from '@capacitor/core'; | ||
}); | ||
export * from './definitions'; | ||
export { Dialog }; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@capacitor/dialog", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "The Dialog API provides methods for triggering native dialog windows for alerts, confirmations, and input prompts", | ||
@@ -46,6 +46,6 @@ "main": "dist/esm/index.js", | ||
"devDependencies": { | ||
"@capacitor/android": "^3.0.0-alpha.7", | ||
"@capacitor/core": "^3.0.0-alpha.7", | ||
"@capacitor/docgen": "^0.0.10", | ||
"@capacitor/ios": "^3.0.0-alpha.7", | ||
"@capacitor/android": "^3.0.0-alpha.10", | ||
"@capacitor/core": "^3.0.0-alpha.9", | ||
"@capacitor/docgen": "0.0.14", | ||
"@capacitor/ios": "^3.0.0-alpha.9", | ||
"@ionic/eslint-config": "^0.3.0", | ||
@@ -63,3 +63,3 @@ "@ionic/prettier-config": "~1.0.1", | ||
"peerDependencies": { | ||
"@capacitor/core": "^3.0.0-alpha.6" | ||
"@capacitor/core": "^3.0.0-alpha.9" | ||
}, | ||
@@ -82,3 +82,3 @@ "prettier": "@ionic/prettier-config", | ||
}, | ||
"gitHead": "78c1981920988ec84c17bbc61b1da1df9743571c" | ||
"gitHead": "481260d148b920b85755dd5f9b65df0bb0db4244" | ||
} |
@@ -12,2 +12,34 @@ # @capacitor/dialog | ||
## Example | ||
```typescript | ||
import { Dialog } from '@capacitor/dialog'; | ||
const showAlert = async () => { | ||
await Dialog.alert({ | ||
title: 'Stop', | ||
message: 'this is an error', | ||
}); | ||
}; | ||
const showConfirm = async () => { | ||
const { value } = await Dialog.confirm({ | ||
title: 'Confirm', | ||
message: `Are you sure you'd like to press the red button?`, | ||
}); | ||
console.log('Confirmed:', value); | ||
}; | ||
const showPrompt = async () => { | ||
const { value, cancelled } = await Dialog.prompt({ | ||
title: 'Hello', | ||
message: `What's your name?`, | ||
}); | ||
console.log('Name:', value); | ||
console.log('Cancelled:', cancelled); | ||
}; | ||
``` | ||
## API | ||
@@ -14,0 +46,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
44476
794
162