From 5f3aedc0f7bd4b5a19b7b7a155d1e2de7b4eb34c Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Fri, 21 Oct 2016 18:27:07 -0400 Subject: [PATCH] docs(button): add advanced usage with property binding, update description of color --- src/components/button/button.ts | 45 ++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/src/components/button/button.ts b/src/components/button/button.ts index 027c61eb13..5fcca91ad9 100644 --- a/src/components/button/button.ts +++ b/src/components/button/button.ts @@ -11,6 +11,7 @@ import { isTrueProperty } from '../../util/util'; * @description * Buttons are simple components in Ionic. They can consist of text and icons * and be enhanced by a wide range of attributes. + * * @usage * * ```html @@ -63,6 +64,48 @@ import { isTrueProperty } from '../../util/util'; * * ``` * + * @advanced + * + * ```html + * + * + * + * + * + * + * + * + * + * + * + * + * + * ``` + * + * ```ts + * @Component({ + * templateUrl: 'main.html' + * }) + * class E2EPage { + * isDanger: boolean = true; + * isSecondary: boolean = false; + * isRound: boolean = true; + * isOutline: boolean = false; + * isClear: boolean = true; + * myColor: string = 'secondary'; + * myColor2: string = 'dark'; + * } + * + * ``` + * * @demo /docs/v2/demos/src/button/ * @see {@link /docs/v2/components#buttons Button Component Docs} * @see {@link /docs/v2/components#fabs FabButton Docs} @@ -201,7 +244,7 @@ export class Button extends Ion { } /** - * @input {string} Dynamically set which predefined color this button should use (e.g. primary, secondary, danger, etc). + * @input {string} The predefined color to use. For example: `"primary"`, `"secondary"`, `"danger"`. */ @Input() set color(val: string) {