docs(): add some docs

This commit is contained in:
mhartington
2018-01-09 11:51:46 -05:00
parent 6156561c1b
commit bf8469bdde
16 changed files with 143 additions and 41 deletions

View File

@ -38,32 +38,32 @@ export class ActionSheet {
@Element() private el: HTMLElement;
/**
* @output {ActionSheetEvent} Emitted after the alert has loaded.
* Emitted after the alert has loaded.
*/
@Event() ionActionSheetDidLoad: EventEmitter<ActionSheetEventDetail>;
/**
* @output {ActionSheetEvent} Emitted after the alert has presented.
* Emitted after the alert has presented.
*/
@Event() ionActionSheetDidPresent: EventEmitter<ActionSheetEventDetail>;
/**
* @output {ActionSheetEvent} Emitted before the alert has presented.
* Emitted before the alert has presented.
*/
@Event() ionActionSheetWillPresent: EventEmitter<ActionSheetEventDetail>;
/**
* @output {ActionSheetEvent} Emitted before the alert has dismissed.
* Emitted before the alert has dismissed.
*/
@Event() ionActionSheetWillDismiss: EventEmitter<ActionSheetDismissEventDetail>;
/**
* @output {ActionSheetEvent} Emitted after the alert has dismissed.
* Emitted after the alert has dismissed.
*/
@Event() ionActionSheetDidDismiss: EventEmitter<ActionSheetDismissEventDetail>;
/**
* @output {ActionSheetEvent} Emitted after the alert has unloaded.
* Emitted after the alert has unloaded.
*/
@Event() ionActionSheetDidUnload: EventEmitter<ActionSheetEventDetail>;
@ -151,7 +151,7 @@ export class ActionSheet {
}
/**
* Dismiss the action-sheet programatically
* Dismiss the action-sheet
*/
@Method()
dismiss(data?: any, role?: string) {

View File

@ -139,27 +139,39 @@ Enable action-sheet animations. If false, action-sheet will not animate in
#### ionActionSheetDidDismiss
Emitted after the alert has dismissed.
#### ionActionSheetDidLoad
Emitted after the alert has loaded.
#### ionActionSheetDidPresent
Emitted after the alert has presented.
#### ionActionSheetDidUnload
Emitted after the alert has unloaded.
#### ionActionSheetWillDismiss
Emitted before the alert has dismissed.
#### ionActionSheetWillPresent
Emitted before the alert has presented.
## Methods
#### dismiss()
Dismiss the action-sheet programatically
Dismiss the action-sheet
#### present()

View File

@ -34,32 +34,32 @@ export class Alert {
@Element() private el: HTMLElement;
/**
* @output {AlertEvent} Emitted after the alert has loaded.
* Emitted after the alert has loaded.
*/
@Event() ionAlertDidLoad: EventEmitter<AlertEventDetail>;
/**
* @output {AlertEvent} Emitted after the alert has presented.
* Emitted after the alert has presented.
*/
@Event() ionAlertDidPresent: EventEmitter<AlertEventDetail>;
/**
* @output {AlertEvent} Emitted before the alert has presented.
* Emitted before the alert has presented.
*/
@Event() ionAlertWillPresent: EventEmitter<AlertEventDetail>;
/**
* @output {AlertEvent} Emitted before the alert has dismissed.
* Emitted before the alert has dismissed.
*/
@Event() ionAlertWillDismiss: EventEmitter<AlertDismissEventDetail>;
/**
* @output {AlertEvent} Emitted after the alert has dismissed.
* Emitted after the alert has dismissed.
*/
@Event() ionAlertDidDismiss: EventEmitter<AlertDismissEventDetail>;
/**
* @output {AlertEvent} Emitted after the alert has unloaded.
* Emitted after the alert has unloaded.
*/
@Event() ionAlertDidUnload: EventEmitter<AlertEventDetail>;
@ -158,7 +158,7 @@ export class Alert {
}
/**
* Dismiss the alert programatically
* Dismiss the alert
*/
@Method() dismiss(data?: any, role?: string) {
if (this.animation) {

View File

@ -167,27 +167,39 @@ Enable alert animations. If false, alert will not animate in
#### ionAlertDidDismiss
Emitted after the alert has dismissed.
#### ionAlertDidLoad
Emitted after the alert has loaded.
#### ionAlertDidPresent
Emitted after the alert has presented.
#### ionAlertDidUnload
Emitted after the alert has unloaded.
#### ionAlertWillDismiss
Emitted before the alert has dismissed.
#### ionAlertWillPresent
Emitted before the alert has presented.
## Methods
#### dismiss()
Dismiss the alert programatically
Dismiss the alert
#### present()

View File

@ -35,7 +35,12 @@ export class App {
rootNavs.set((event.detail as Nav).navId, (event.detail as Nav));
}
@Method() getRootNavs(): NavContainer[] {
/**
* Returns an array of top level Navs
*/
@Method()
getRootNavs(): NavContainer[] {
const navs: NavContainer[] = [];
rootNavs.forEach((rootNav: NavContainer) => {
navs.push(rootNav);
@ -43,6 +48,10 @@ export class App {
return navs;
}
/**
* Check if the app is currently scrolling
*/
@Method() isScrolling(): boolean {
// TODO - sync with Manu
return false;

View File

@ -15,9 +15,13 @@
#### getRootNavs()
Returns an array of top level Navs
#### isScrolling()
Check if the app is currently scrolling
----------------------------------------------

View File

@ -12,16 +12,14 @@ import { Component, Prop } from '@stencil/core';
})
export class CardContent {
/**
* @input {string} The color to use from your Sass `$colors` map.
* The color to use for the text.
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
* For more information, see [Theming your App](/docs/theming/theming-your-app).
*/
@Prop() color: string;
/**
* @input {string} The mode determines which platform styles to use.
* The mode determines which platform styles to use.
* Possible values are: `"ios"` or `"md"`.
* For more information, see [Platform Styles](/docs/theming/platform-specific-styles).
*/
@Prop() mode: 'ios' | 'md';

View File

@ -1,5 +1,7 @@
# ion-card-content
`ion-card-content` is child component of `ion-card` that adds some content padding.
It is recommended that any text content for a card should be placed in an `ion-card-content`.
<!-- Auto Generated Below -->
@ -11,11 +13,17 @@
string
The color to use for the text.
Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
#### mode
any
The mode determines which platform styles to use.
Possible values are: `"ios"` or `"md"`.
## Attributes
@ -23,11 +31,17 @@ any
string
The color to use for the text.
Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
#### mode
any
The mode determines which platform styles to use.
Possible values are: `"ios"` or `"md"`.
----------------------------------------------

View File

@ -14,21 +14,19 @@ import { createThemedClasses } from '../../utils/theme';
})
export class CardHeader {
/**
* @input {string} The color to use from your Sass `$colors` map.
* The color to use for the background.
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
* For more information, see [Theming your App](/docs/theming/theming-your-app).
*/
@Prop() color: string;
/**
* @input {string} The mode determines which platform styles to use.
* The mode determines which platform styles to use.
* Possible values are: `"ios"` or `"md"`.
* For more information, see [Platform Styles](/docs/theming/platform-specific-styles).
*/
@Prop() mode: 'ios' | 'md';
/**
* @input {boolean} If true, adds transparency to the card header.
* If true, adds transparency to the card header.
* Only affects `ios` mode. Defaults to `false`.
*/
@Prop() translucent: boolean = false;

View File

@ -1,6 +1,6 @@
# ion-card-header
`ion-card-header` is a header component for `ion-card`.
<!-- Auto Generated Below -->
@ -11,16 +11,25 @@
string
The color to use for the background.
Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
#### mode
any
The mode determines which platform styles to use.
Possible values are: `"ios"` or `"md"`.
#### translucent
boolean
If true, adds transparency to the card header.
Only affects `ios` mode. Defaults to `false`.
## Attributes
@ -28,16 +37,25 @@ boolean
string
The color to use for the background.
Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
#### mode
any
The mode determines which platform styles to use.
Possible values are: `"ios"` or `"md"`.
#### translucent
boolean
If true, adds transparency to the card header.
Only affects `ios` mode. Defaults to `false`.
----------------------------------------------

View File

@ -13,16 +13,14 @@ import { Component, Prop} from '@stencil/core';
})
export class CardSubtitle {
/**
* @input {string} The color to use from your Sass `$colors` map.
* The color to use for the text color.
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
* For more information, see [Theming your App](/docs/theming/theming-your-app).
*/
@Prop() color: string;
/**
* @input {string} The mode determines which platform styles to use.
* The mode determines which platform styles to use.
* Possible values are: `"ios"` or `"md"`.
* For more information, see [Platform Styles](/docs/theming/platform-specific-styles).
*/
@Prop() mode: 'ios' | 'md';

View File

@ -1,6 +1,6 @@
# ion-card-subtitle
`ion-card-subtitle` is a child component of `ion-card`
<!-- Auto Generated Below -->
@ -11,11 +11,17 @@
string
The color to use for the text color.
Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
#### mode
any
The mode determines which platform styles to use.
Possible values are: `"ios"` or `"md"`.
## Attributes
@ -23,11 +29,17 @@ any
string
The color to use for the text color.
Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
#### mode
any
The mode determines which platform styles to use.
Possible values are: `"ios"` or `"md"`.
----------------------------------------------

View File

@ -12,17 +12,16 @@ import { Component, Prop} from '@stencil/core';
}
})
export class CardTitle {
/**
* @input {string} The color to use from your Sass `$colors` map.
* The color to use for the text color.
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
* For more information, see [Theming your App](/docs/theming/theming-your-app).
*/
@Prop() color: string;
/**
* @input {string} The mode determines which platform styles to use.
* The mode determines which platform styles to use.
* Possible values are: `"ios"` or `"md"`.
* For more information, see [Platform Styles](/docs/theming/platform-specific-styles).
*/
@Prop() mode: 'ios' | 'md';

View File

@ -1,5 +1,6 @@
# ion-card-title
`ion-card-title` is a child component of `ion-card`
<!-- Auto Generated Below -->
@ -11,11 +12,17 @@
string
The color to use for the text color.
Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
#### mode
any
The mode determines which platform styles to use.
Possible values are: `"ios"` or `"md"`.
## Attributes
@ -23,11 +30,17 @@ any
string
The color to use for the text color.
Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
#### mode
any
The mode determines which platform styles to use.
Possible values are: `"ios"` or `"md"`.
----------------------------------------------

View File

@ -11,17 +11,16 @@ import { Component, Prop } from '@stencil/core';
}
})
export class Card {
/**
* @input {string} The color to use from your Sass `$colors` map.
* The color to use for the background.
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
* For more information, see [Theming your App](/docs/theming/theming-your-app).
*/
@Prop() color: string;
/**
* @input {string} The mode determines which platform styles to use.
* The mode determines which platform styles to use.
* Possible values are: `"ios"` or `"md"`.
* For more information, see [Platform Styles](/docs/theming/platform-specific-styles).
*/
@Prop() mode: 'ios' | 'md';

View File

@ -1,6 +1,10 @@
# ion-card
Cards are a standard piece of UI that serves as an entry point to more detailed
information. A card can be a single component, but is often made up of some
header, title, subtitle, and content. `ion-card` is broken up into several
sub-components to reflect this. Please see `ion-card-content`,
`ion-card-header`, `ion-card-title`, `ion-card-subtitle`.
<!-- Auto Generated Below -->
@ -11,11 +15,17 @@
string
The color to use for the background.
Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
#### mode
any
The mode determines which platform styles to use.
Possible values are: `"ios"` or `"md"`.
## Attributes
@ -23,11 +33,17 @@ any
string
The color to use for the background.
Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
#### mode
any
The mode determines which platform styles to use.
Possible values are: `"ios"` or `"md"`.
----------------------------------------------