From 7331e3a9105ee37559320a5145d5b07e828663b8 Mon Sep 17 00:00:00 2001 From: mhartington Date: Mon, 7 Mar 2016 12:34:54 -0500 Subject: [PATCH] docs(alert): add table for alert options References https://github.com/driftyco/ionic-site/issues/405 --- ionic/components/alert/alert.ts | 37 ++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/ionic/components/alert/alert.ts b/ionic/components/alert/alert.ts index 5562ec8bc7..917af7a7b7 100644 --- a/ionic/components/alert/alert.ts +++ b/ionic/components/alert/alert.ts @@ -207,7 +207,42 @@ export class Alert extends ViewController { } /** - * @param {object} opts Alert options + * + * Alert options + * + * | Property | Type | Description | + * |-----------------------|-----------|---------------------------------------------------------------------------| + * | title | `string` | The string for the alert (optional) | + * | subTitle | `string` | The subtitle for the alert (optional) | + * | message | `string` | The message for the alert (optional) | + * | cssClass | `string` | Any additional class for the alert (optional) | + * | inputs | `array` | An array of inputs for the alert. See input options. (optional) | + * | buttons | `array` | An array of buttons for the alert. See buttons options. (optional) | + * | enableBackdropDismiss | `boolean` | Wheather the alert should be dismissed by tapping the backdrop (optional) | + * + * + * Input options + * + * | Property | Type | Description | + * |-------------|-----------|-----------------------------------------------------------------| + * | type | `string` | The type the input should be, text, tel, number, etc (optional) | + * | name | `string` | The name for the input (optional) | + * | placeHolder | `string` | The input's placeholder (optional) | + * | value | `string` | The input's value (optional) | + * | label | `string` | The input's label (optional) | + * | chacked | `boolean` | Whether or not the input is checked or not (optional) | + * | id | `string` | The input's id (optional) | + * + * Button options + * + * | Property | Type | Description | + * |----------|----------|----------------------------------------------------------------| + * | text | `string` | The buttons displayed text | + * | handler | `any` | Expression that should be evaluated when the button is pressed | + * | cssClass | `string` | An additional CSS class for the button | + * | role | `string` | The buttons role, null or `cancel` | + * + * @param {object} opts Alert. See the tabel above */ static create(opts: AlertOptions = {}) { return new Alert(opts);