Skip to content

Commit cc21f93

Browse files
committed
docs(API): update descriptions to be more clear
also update descriptions for the same properties to be more consistent, and reword all events to start and end the same. closes #10248 closes ionic-team/ionic-site#613 closes ionic-team/ionic-site#899
1 parent ace727e commit cc21f93

File tree

39 files changed

+304
-202
lines changed

39 files changed

+304
-202
lines changed

src/components/alert/alert.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export class Alert extends ViewController {
239239
* | Property | Type | Description |
240240
* |----------|----------|-----------------------------------------------------------------|
241241
* | text | `string` | The buttons displayed text. |
242-
* | handler | `any` | Expression that should be evaluated when the button is pressed. |
242+
* | handler | `any` | Emitted when the button is pressed. |
243243
* | cssClass | `string` | An additional CSS class for the button. |
244244
* | role | `string` | The buttons role, null or `cancel`. |
245245
*

src/components/badge/badge.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,19 @@ import { Ion } from '../ion';
1717
export class Badge extends Ion {
1818

1919
/**
20-
* @input {string} The predefined color to use. For example: `"primary"`, `"secondary"`, `"danger"`.
20+
* @input {string} The color to use from your Sass `$colors` map.
21+
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
22+
* For more information, see [Theming your App](/docs/v2/theming/theming-your-app).
2123
*/
2224
@Input()
2325
set color(val: string) {
2426
this._setColor(val);
2527
}
2628

2729
/**
28-
* @input {string} The mode to apply to this component. Mode can be `ios`, `wp`, or `md`.
30+
* @input {string} The mode determines which platform styles to use.
31+
* Possible values are: `"ios"`, `"md"`, or `"wp"`.
32+
* For more information, see [Platform Styles](/docs/v2/theming/platform-specific-styles).
2933
*/
3034
@Input()
3135
set mode(val: string) {

src/components/button/button.ts

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,87 +153,90 @@ export class Button extends Ion {
153153
_init: boolean;
154154

155155
/**
156-
* @input {boolean} Large button.
156+
* @input {boolean} If true, activates the large button size.
157157
*/
158158
@Input()
159159
set large(val: boolean) {
160160
this._attr('_size', 'large', val);
161161
}
162162

163163
/**
164-
* @input {boolean} Small button.
164+
* @input {boolean} If true, activates the small button size.
165165
*/
166166
@Input()
167167
set small(val: boolean) {
168168
this._attr('_size', 'small', val);
169169
}
170170

171171
/**
172-
* @input {boolean} Default button.
172+
* @input {boolean} If true, activates the default button size. Normally the default, useful for buttons in an item.
173173
*/
174174
@Input()
175175
set default(val: boolean) {
176176
this._attr('_size', 'default', val);
177177
}
178178

179179
/**
180-
* @input {boolean} A transparent button with a border.
180+
* @input {boolean} If true, activates a transparent button style with a border.
181181
*/
182182
@Input()
183183
set outline(val: boolean) {
184184
this._attr('_style', 'outline', val);
185185
}
186186

187187
/**
188-
* @input {boolean} A transparent button without a border.
188+
* @input {boolean} If true, activates a transparent button style without a border.
189189
*/
190190
@Input()
191191
set clear(val: boolean) {
192192
this._attr('_style', 'clear', val);
193193
}
194194

195195
/**
196-
* @input {boolean} Force a solid button. Useful for buttons within an item.
196+
* @input {boolean} If true, activates a solid button style. Normally the default, useful for buttons in a toolbar.
197197
*/
198198
@Input()
199199
set solid(val: boolean) {
200200
this._attr('_style', 'solid', val);
201201
}
202202

203203
/**
204-
* @input {boolean} A button with rounded corners.
204+
* @input {boolean} If true, activates a button with rounded corners.
205205
*/
206206
@Input()
207207
set round(val: boolean) {
208208
this._attr('_shape', 'round', val);
209209
}
210210

211211
/**
212-
* @input {boolean} A button that fills its parent container with a border-radius.
212+
* @input {boolean} If true, activates a button style that fills the available width.
213213
*/
214214
@Input()
215215
set block(val: boolean) {
216216
this._attr('_display', 'block', val);
217217
}
218218

219219
/**
220-
* @input {boolean} A button that fills its parent container without a border-radius or borders on the left/right.
220+
* @input {boolean} If true, activates a button style that fills the available width without
221+
* a left and right border.
221222
*/
222223
@Input()
223224
set full(val: boolean) {
224225
this._attr('_display', 'full', val);
225226
}
226227

227228
/**
228-
* @input {boolean} A button that has strong importance, ie. it represents an important action.
229+
* @input {boolean} If true, activates a button with a heavier font weight.
229230
*/
230231
@Input()
231232
set strong(val: boolean) {
232233
this._attr('_decorator', 'strong', val);
233234
}
234235

235236
/**
236-
* @input {string} The mode to apply to this component. Mode can be `ios`, `wp`, or `md`.
237+
* @input {string} The mode determines which platform styles to use.
238+
* Possible values are: `"ios"`, `"md"`, or `"wp"`.
239+
* For more information, see [Platform Styles](/docs/v2/theming/platform-specific-styles).
237240
*/
238241
@Input()
239242
set mode(val: string) {
@@ -264,7 +267,9 @@ export class Button extends Ion {
264267
}
265268

266269
/**
267-
* @input {string} The predefined color to use. For example: `"primary"`, `"secondary"`, `"danger"`.
270+
* @input {string} The color to use from your Sass `$colors` map.
271+
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
272+
* For more information, see [Theming your App](/docs/v2/theming/theming-your-app).
268273
*/
269274
@Input()
270275
set color(val: string) {

src/components/card/card.ts

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,19 @@ import { Ion } from '../ion';
1313
export class Card extends Ion {
1414

1515
/**
16-
* @input {string} The predefined color to use. For example: `"primary"`, `"secondary"`, `"danger"`.
16+
* @input {string} The color to use from your Sass `$colors` map.
17+
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
18+
* For more information, see [Theming your App](/docs/v2/theming/theming-your-app).
1719
*/
1820
@Input()
1921
set color(val: string) {
2022
this._setColor(val);
2123
}
2224

2325
/**
24-
* @input {string} The mode to apply to this component. Mode can be `ios`, `wp`, or `md`.
26+
* @input {string} The mode determines which platform styles to use.
27+
* Possible values are: `"ios"`, `"md"`, or `"wp"`.
28+
* For more information, see [Platform Styles](/docs/v2/theming/platform-specific-styles).
2529
*/
2630
@Input()
2731
set mode(val: string) {
@@ -44,16 +48,20 @@ export class Card extends Ion {
4448
export class CardContent extends Ion {
4549

4650
/**
47-
* @input {string} The predefined color to use. For example: `"primary"`, `"secondary"`, `"danger"`.
51+
* @input {string} The color to use from your Sass `$colors` map.
52+
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
53+
* For more information, see [Theming your App](/docs/v2/theming/theming-your-app).
4854
*/
4955
@Input()
5056
set color(val: string) {
5157
this._setColor(val);
5258
}
5359

5460
/**
55-
* @input {string} The mode to apply to this component.
56-
*/
61+
* @input {string} The mode determines which platform styles to use.
62+
* Possible values are: `"ios"`, `"md"`, or `"wp"`.
63+
* For more information, see [Platform Styles](/docs/v2/theming/platform-specific-styles).
64+
*/
5765
@Input()
5866
set mode(val: string) {
5967
this._setMode(val);
@@ -75,15 +83,19 @@ export class CardContent extends Ion {
7583
export class CardHeader extends Ion {
7684

7785
/**
78-
* @input {string} The predefined color to use. For example: `"primary"`, `"secondary"`, `"danger"`.
86+
* @input {string} The color to use from your Sass `$colors` map.
87+
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
88+
* For more information, see [Theming your App](/docs/v2/theming/theming-your-app).
7989
*/
8090
@Input()
8191
set color(val: string) {
8292
this._setColor(val);
8393
}
8494

8595
/**
86-
* @input {string} The mode to apply to this component.
96+
* @input {string} The mode determines which platform styles to use.
97+
* Possible values are: `"ios"`, `"md"`, or `"wp"`.
98+
* For more information, see [Platform Styles](/docs/v2/theming/platform-specific-styles).
8799
*/
88100
@Input()
89101
set mode(val: string) {
@@ -105,15 +117,19 @@ export class CardHeader extends Ion {
105117
export class CardTitle extends Ion {
106118

107119
/**
108-
* @input {string} The predefined color to use. For example: `"primary"`, `"secondary"`, `"danger"`.
120+
* @input {string} The color to use from your Sass `$colors` map.
121+
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
122+
* For more information, see [Theming your App](/docs/v2/theming/theming-your-app).
109123
*/
110124
@Input()
111125
set color(val: string) {
112126
this._setColor(val);
113127
}
114128

115129
/**
116-
* @input {string} The mode to apply to this component.
130+
* @input {string} The mode determines which platform styles to use.
131+
* Possible values are: `"ios"`, `"md"`, or `"wp"`.
132+
* For more information, see [Platform Styles](/docs/v2/theming/platform-specific-styles).
117133
*/
118134
@Input()
119135
set mode(val: string) {

src/components/checkbox/checkbox.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,23 +87,27 @@ export class Checkbox extends Ion implements IonicTapInput, AfterContentInit, Co
8787
id: string;
8888

8989
/**
90-
* @input {string} The predefined color to use. For example: `"primary"`, `"secondary"`, `"danger"`.
90+
* @input {string} The color to use from your Sass `$colors` map.
91+
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
92+
* For more information, see [Theming your App](/docs/v2/theming/theming-your-app).
9193
*/
9294
@Input()
9395
set color(val: string) {
9496
this._setColor(val);
9597
}
9698

9799
/**
98-
* @input {string} The mode to apply to this component. Mode can be `ios`, `wp`, or `md`.
100+
* @input {string} The mode determines which platform styles to use.
101+
* Possible values are: `"ios"`, `"md"`, or `"wp"`.
102+
* For more information, see [Platform Styles](/docs/v2/theming/platform-specific-styles).
99103
*/
100104
@Input()
101105
set mode(val: string) {
102106
this._setMode(val);
103107
}
104108

105109
/**
106-
* @output {Checkbox} expression to evaluate when the checkbox value changes
110+
* @output {Checkbox} Emitted when the checkbox value changes.
107111
*/
108112
@Output() ionChange: EventEmitter<Checkbox> = new EventEmitter<Checkbox>();
109113

@@ -138,7 +142,7 @@ export class Checkbox extends Ion implements IonicTapInput, AfterContentInit, Co
138142
}
139143

140144
/**
141-
* @input {boolean} whether or not the checkbox is checked (defaults to false)
145+
* @input {boolean} If `true`, the element is selected.
142146
*/
143147
@Input()
144148
get checked(): boolean {
@@ -189,7 +193,7 @@ export class Checkbox extends Ion implements IonicTapInput, AfterContentInit, Co
189193
registerOnTouched(fn: any) { this.onTouched = fn; }
190194

191195
/**
192-
* @input {boolean} whether or not the checkbox is disabled or not.
196+
* @input {boolean} If true, the user cannot interact with this element.
193197
*/
194198
@Input()
195199
get disabled(): boolean {

src/components/chip/chip.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,19 @@ import { Ion } from '../ion';
9696
export class Chip extends Ion {
9797

9898
/**
99-
* @input {string} The predefined color to use. For example: `"primary"`, `"secondary"`, `"danger"`.
99+
* @input {string} The color to use from your Sass `$colors` map.
100+
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
101+
* For more information, see [Theming your App](/docs/v2/theming/theming-your-app).
100102
*/
101103
@Input()
102104
set color(val: string) {
103105
this._setColor(val);
104106
}
105107

106108
/**
107-
* @input {string} The mode to apply to this component. Mode can be `ios`, `wp`, or `md`.
109+
* @input {string} The mode determines which platform styles to use.
110+
* Possible values are: `"ios"`, `"md"`, or `"wp"`.
111+
* For more information, see [Platform Styles](/docs/v2/theming/platform-specific-styles).
108112
*/
109113
@Input()
110114
set mode(val: string) {

src/components/content/content.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -463,23 +463,15 @@ export class Content extends Ion implements OnDestroy, OnInit {
463463
}
464464

465465
/**
466-
* @input {boolean} By default, content is positioned between the headers
467-
* and footers. However, using `fullscreen="true"`, the content will be
468-
* able to scroll "under" the headers and footers. At first glance the
469-
* fullscreen option may not look any different than the default, however,
470-
* by adding a transparency effect to a header then the content can be
471-
* seen under the header as the user scrolls.
472-
*
473-
* @returns {boolean}
466+
* @input {boolean} If true, the content will scroll behind the headers
467+
* and footers. This effect can easily be seen by setting the toolbar
468+
* to transparent.
474469
*/
475470
@Input()
476471
get fullscreen(): boolean {
477472
return !!this._fullscreen;
478473
}
479474

480-
/**
481-
* @param {boolean} val
482-
*/
483475
set fullscreen(val: boolean) {
484476
this._fullscreen = isTrueProperty(val);
485477
}

src/components/datetime/datetime.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -408,20 +408,22 @@ export class DateTime extends Ion implements AfterContentInit, ControlValueAcces
408408
@Input() pickerOptions: any = {};
409409

410410
/**
411-
* @input {string} The mode to apply to this component. Mode can be `ios`, `wp`, or `md`.
411+
* @input {string} The mode determines which platform styles to use.
412+
* Possible values are: `"ios"`, `"md"`, or `"wp"`.
413+
* For more information, see [Platform Styles](/docs/v2/theming/platform-specific-styles).
412414
*/
413415
@Input()
414416
set mode(val: string) {
415417
this._setMode(val);
416418
}
417419

418420
/**
419-
* @output {any} Any expression to evaluate when the datetime selection has changed.
421+
* @output {any} Emitted when the datetime selection has changed.
420422
*/
421423
@Output() ionChange: EventEmitter<any> = new EventEmitter();
422424

423425
/**
424-
* @output {any} Any expression to evaluate when the datetime selection was cancelled.
426+
* @output {any} Emitted when the datetime selection was cancelled.
425427
*/
426428
@Output() ionCancel: EventEmitter<any> = new EventEmitter();
427429

@@ -784,14 +786,14 @@ export class DateTime extends Ion implements AfterContentInit, ControlValueAcces
784786
}
785787

786788
/**
787-
* @input {boolean} Whether or not the datetime component is disabled. Default `false`.
789+
* @input {boolean} If true, the user cannot interact with this element.
788790
*/
789791
@Input()
790-
get disabled() {
792+
get disabled(): boolean {
791793
return this._disabled;
792794
}
793795

794-
set disabled(val) {
796+
set disabled(val: boolean) {
795797
this._disabled = isTrueProperty(val);
796798
this._item && this._item.setElementClass('item-datetime-disabled', this._disabled);
797799
}

src/components/fab/fab.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,19 @@ import { UIEventManager } from '../../gestures/ui-event-manager';
6666
export class FabButton extends Ion {
6767

6868
/**
69-
* @input {string} The predefined color to use. For example: `"primary"`, `"secondary"`, `"danger"`.
69+
* @input {string} The color to use from your Sass `$colors` map.
70+
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
71+
* For more information, see [Theming your App](/docs/v2/theming/theming-your-app).
7072
*/
7173
@Input()
7274
set color(val: string) {
7375
this._setColor(val);
7476
}
7577

7678
/**
77-
* @input {string} The mode to apply to this component. Mode can be `ios`, `wp`, or `md`.
79+
* @input {string} The mode determines which platform styles to use.
80+
* Possible values are: `"ios"`, `"md"`, or `"wp"`.
81+
* For more information, see [Platform Styles](/docs/v2/theming/platform-specific-styles).
7882
*/
7983
@Input()
8084
set mode(val: string) {

0 commit comments

Comments
 (0)