docs(actionSheet): improve docs

This commit is contained in:
mhartington 2016-07-01 11:38:12 -04:00
parent 3a6210873e
commit 5a14ec01ef
No known key found for this signature in database
GPG Key ID: C0CE5F60E890DB47
3 changed files with 27 additions and 15 deletions

View File

@ -1,4 +1,5 @@
module.exports = [ module.exports = [
{'name': 'advanced'},
{'name': 'demo'}, {'name': 'demo'},
{'name': 'usage'} {'name': 'usage'}
]; ];

View File

@ -276,6 +276,13 @@ docType: "<$ doc.docType $>"
<@- endif -@> <@- endif -@>
<@ block advanced @>
<@- if doc.advanced -@>
<h2><a class="anchor" name="advanced" href="#advanced"></a>Advanced</h2>
<$ doc.advanced | marked $>
<@- endif -@>
<@ endblock @>
<!-- related link --> <!-- related link -->
<@- if doc.see @> <@- if doc.see @>

View File

@ -22,17 +22,8 @@ import {Plugin, Cordova} from './plugin';
* }); * });
* ``` * ```
* *
*/ * @advanced
@Plugin({ * ActionSheet options
plugin: 'cordova-plugin-actionsheet',
pluginRef: 'plugins.actionsheet',
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-actionsheet',
platforms: ['Android', 'iOS', 'Windows Phone 8']
})
export class ActionSheet {
/**
* Show the ActionSheet. The ActionSheet's options is an object with the following propterties.
* *
* | Option | Type | Description | * | Option | Type | Description |
* |-------------------------------|-----------|----------------------------------------------| * |-------------------------------|-----------|----------------------------------------------|
@ -45,7 +36,19 @@ export class ActionSheet {
* | addDestructiveButtonWithLabel |`string` | Add a destructive button with text | * | addDestructiveButtonWithLabel |`string` | Add a destructive button with text |
* | position |`number[]` | On an iPad, set the X,Y position | * | position |`number[]` | On an iPad, set the X,Y position |
* *
* @param {options} Options See table above *
*/
@Plugin({
plugin: 'cordova-plugin-actionsheet',
pluginRef: 'plugins.actionsheet',
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-actionsheet',
platforms: ['Android', 'iOS', 'Windows Phone 8']
})
export class ActionSheet {
/**
* Show a native ActionSheet component. See below for options.
* @param {options} Options See table below
* @returns {Promise} Returns a Promise that resolves with the index of the * @returns {Promise} Returns a Promise that resolves with the index of the
* button pressed (1 based, so 1, 2, 3, etc.) * button pressed (1 based, so 1, 2, 3, etc.)
*/ */
@ -63,7 +66,8 @@ export class ActionSheet {
/** /**
* Hide the ActionSheet. * Progamtically hide the native ActionSheet
* @returns {Promise} Returns a Promise that resolves when the actionsheet is closed
*/ */
@Cordova() @Cordova()
static hide(): Promise<any> { return; } static hide(): Promise<any> { return; }