docs(actionSheet): improve docs
This commit is contained in:
parent
3a6210873e
commit
5a14ec01ef
@ -1,4 +1,5 @@
|
|||||||
module.exports = [
|
module.exports = [
|
||||||
|
{'name': 'advanced'},
|
||||||
{'name': 'demo'},
|
{'name': 'demo'},
|
||||||
{'name': 'usage'}
|
{'name': 'usage'}
|
||||||
];
|
];
|
||||||
|
7
scripts/docs/templates/common.template.html
vendored
7
scripts/docs/templates/common.template.html
vendored
@ -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 @>
|
||||||
|
|
||||||
|
@ -22,6 +22,21 @@ import {Plugin, Cordova} from './plugin';
|
|||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
|
* @advanced
|
||||||
|
* ActionSheet options
|
||||||
|
*
|
||||||
|
* | Option | Type | Description |
|
||||||
|
* |-------------------------------|-----------|----------------------------------------------|
|
||||||
|
* | title |`string` | The title for the actionsheet |
|
||||||
|
* | buttonLabels |`string[]` | the labels for the buttons. Uses the index x |
|
||||||
|
* | androidTheme |`number` | Theme to be used on Android |
|
||||||
|
* | androidEnableCancelButton |`boolean` | Enable a cancel on Android |
|
||||||
|
* | winphoneEnableCancelButton |`boolean` | Enable a cancel on Windows Phone |
|
||||||
|
* | addCancelButtonWithLabel |`string` | Add a cancel button with text |
|
||||||
|
* | addDestructiveButtonWithLabel |`string` | Add a destructive button with text |
|
||||||
|
* | position |`number[]` | On an iPad, set the X,Y position |
|
||||||
|
*
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
plugin: 'cordova-plugin-actionsheet',
|
plugin: 'cordova-plugin-actionsheet',
|
||||||
@ -32,20 +47,8 @@ import {Plugin, Cordova} from './plugin';
|
|||||||
export class ActionSheet {
|
export class ActionSheet {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the ActionSheet. The ActionSheet's options is an object with the following propterties.
|
* Show a native ActionSheet component. See below for options.
|
||||||
*
|
* @param {options} Options See table below
|
||||||
* | Option | Type | Description |
|
|
||||||
* |-------------------------------|-----------|----------------------------------------------|
|
|
||||||
* | title |`string` | The title for the actionsheet |
|
|
||||||
* | buttonLabels |`string[]` | the labels for the buttons. Uses the index x |
|
|
||||||
* | androidTheme |`number` | Theme to be used on Android |
|
|
||||||
* | androidEnableCancelButton |`boolean` | Enable a cancel on Android |
|
|
||||||
* | winphoneEnableCancelButton |`boolean` | Enable a cancel on Windows Phone |
|
|
||||||
* | addCancelButtonWithLabel |`string` | Add a cancel button with text |
|
|
||||||
* | addDestructiveButtonWithLabel |`string` | Add a destructive button with text |
|
|
||||||
* | position |`number[]` | On an iPad, set the X,Y position |
|
|
||||||
*
|
|
||||||
* @param {options} Options See table above
|
|
||||||
* @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; }
|
||||||
|
Loading…
Reference in New Issue
Block a user