mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
docs(): remove code blocks in docs
This commit is contained in:
@@ -160,9 +160,6 @@ export class ActionSheet implements OverlayInterface {
|
||||
* Returns a promise that resolves when the action-sheet did dismiss. It also accepts a callback
|
||||
* that is called in the same circustances.
|
||||
*
|
||||
* ```
|
||||
* const {data, role} = await actionSheet.onDidDismiss();
|
||||
* ```
|
||||
*/
|
||||
@Method()
|
||||
onDidDismiss(callback?: (detail: OverlayEventDetail) => void): Promise<OverlayEventDetail> {
|
||||
@@ -173,9 +170,6 @@ export class ActionSheet implements OverlayInterface {
|
||||
* Returns a promise that resolves when the action-sheet will dismiss. It also accepts a callback
|
||||
* that is called in the same circustances.
|
||||
*
|
||||
* ```
|
||||
* const {data, role} = await actionSheet.onWillDismiss();
|
||||
* ```
|
||||
*/
|
||||
@Method()
|
||||
onWillDismiss(callback?: (detail: OverlayEventDetail) => void): Promise<OverlayEventDetail> {
|
||||
|
||||
@@ -218,20 +218,12 @@ Dismiss the action sheet overlay after it has been presented.
|
||||
Returns a promise that resolves when the action-sheet did dismiss. It also accepts a callback
|
||||
that is called in the same circustances.
|
||||
|
||||
```
|
||||
const {data, role} = await actionSheet.onDidDismiss();
|
||||
```
|
||||
|
||||
|
||||
#### onWillDismiss()
|
||||
|
||||
Returns a promise that resolves when the action-sheet will dismiss. It also accepts a callback
|
||||
that is called in the same circustances.
|
||||
|
||||
```
|
||||
const {data, role} = await actionSheet.onWillDismiss();
|
||||
```
|
||||
|
||||
|
||||
#### present()
|
||||
|
||||
|
||||
@@ -195,9 +195,6 @@ export class Alert implements OverlayInterface {
|
||||
* Returns a promise that resolves when the alert did dismiss. It also accepts a callback
|
||||
* that is called in the same circumstances.
|
||||
*
|
||||
* ```
|
||||
* const {data, role} = await alert.onDidDismiss();
|
||||
* ```
|
||||
*/
|
||||
@Method()
|
||||
onDidDismiss(callback?: (detail: OverlayEventDetail) => void): Promise<OverlayEventDetail> {
|
||||
@@ -208,9 +205,6 @@ export class Alert implements OverlayInterface {
|
||||
* Returns a promise that resolves when the alert will dismiss. It also accepts a callback
|
||||
* that is called in the same circumstances.
|
||||
*
|
||||
* ```
|
||||
* const {data, role} = await alert.onWillDismiss();
|
||||
* ```
|
||||
*/
|
||||
@Method()
|
||||
onWillDismiss(callback?: (detail: OverlayEventDetail) => void): Promise<OverlayEventDetail> {
|
||||
|
||||
@@ -257,20 +257,12 @@ Dismiss the alert overlay after it has been presented.
|
||||
Returns a promise that resolves when the alert did dismiss. It also accepts a callback
|
||||
that is called in the same circumstances.
|
||||
|
||||
```
|
||||
const {data, role} = await alert.onDidDismiss();
|
||||
```
|
||||
|
||||
|
||||
#### onWillDismiss()
|
||||
|
||||
Returns a promise that resolves when the alert will dismiss. It also accepts a callback
|
||||
that is called in the same circumstances.
|
||||
|
||||
```
|
||||
const {data, role} = await alert.onWillDismiss();
|
||||
```
|
||||
|
||||
|
||||
#### present()
|
||||
|
||||
|
||||
@@ -11,9 +11,7 @@ Label is a wrapper element that can be used in combination with `ion-item`.
|
||||
|
||||
string
|
||||
|
||||
The color to use from your Sass `$colors` map.
|
||||
Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
|
||||
For more information, see [Theming your App](/docs/theming/theming-your-app).
|
||||
The color to use for the label's text
|
||||
|
||||
|
||||
#### mode
|
||||
@@ -22,7 +20,6 @@ string
|
||||
|
||||
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).
|
||||
|
||||
|
||||
#### position
|
||||
@@ -39,9 +36,7 @@ Possible values are: 'inline' | 'fixed' | 'stacked' | 'floating'
|
||||
|
||||
string
|
||||
|
||||
The color to use from your Sass `$colors` map.
|
||||
Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
|
||||
For more information, see [Theming your App](/docs/theming/theming-your-app).
|
||||
The color to use for the label's text
|
||||
|
||||
|
||||
#### mode
|
||||
@@ -50,7 +45,6 @@ string
|
||||
|
||||
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).
|
||||
|
||||
|
||||
#### position
|
||||
|
||||
@@ -11,9 +11,7 @@ List header a header component for a list.
|
||||
|
||||
string
|
||||
|
||||
The color to use from your Sass `$colors` map.
|
||||
Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
|
||||
For more information, see [Theming your App](/docs/theming/theming-your-app).
|
||||
The color to use for the background.
|
||||
|
||||
|
||||
#### mode
|
||||
@@ -22,7 +20,6 @@ string
|
||||
|
||||
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).
|
||||
|
||||
|
||||
## Attributes
|
||||
@@ -31,9 +28,7 @@ For more information, see [Platform Styles](/docs/theming/platform-specific-styl
|
||||
|
||||
string
|
||||
|
||||
The color to use from your Sass `$colors` map.
|
||||
Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
|
||||
For more information, see [Theming your App](/docs/theming/theming-your-app).
|
||||
The color to use for the background.
|
||||
|
||||
|
||||
#### mode
|
||||
@@ -42,7 +37,6 @@ string
|
||||
|
||||
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).
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,12 +12,18 @@ Loading controllers programmatically control the loading component. Loadings can
|
||||
|
||||
#### create()
|
||||
|
||||
Create a loading overlay with loading options.
|
||||
|
||||
|
||||
#### dismiss()
|
||||
|
||||
Dismiss the open loading overlay.
|
||||
|
||||
|
||||
#### getTop()
|
||||
|
||||
Get the most recently opened loading overlay.
|
||||
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
@@ -242,10 +242,6 @@ Dismiss the loading overlay after it has been presented.
|
||||
Returns a promise that resolves when the loading did dismiss. It also accepts a callback
|
||||
that is called in the same circustances.
|
||||
|
||||
```
|
||||
const {data, role} = await loading.onDidDismiss();
|
||||
```
|
||||
|
||||
|
||||
#### onWillDismiss()
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ The MenuController makes it easy to control a Menu. Its methods can be used to d
|
||||
|
||||
#### close()
|
||||
|
||||
Programatically close the Menu. If no `menuId` is given as the first
|
||||
Close the Menu. If no `menuId` is given as the first
|
||||
argument then it'll close any menu which is open. If a `menuId`
|
||||
is given then it'll close that exact menu.
|
||||
|
||||
@@ -49,22 +49,32 @@ property. If a menu is not found then it'll return `null`.
|
||||
|
||||
#### getMenus()
|
||||
|
||||
Returns an array of all menu instances.
|
||||
|
||||
|
||||
#### getOpen()
|
||||
|
||||
Returns the instance of the menu already opened, otherwise `null`.
|
||||
|
||||
|
||||
#### isAnimating()
|
||||
|
||||
If any menu is currently animating
|
||||
|
||||
|
||||
#### isEnabled()
|
||||
|
||||
Returns true or false if the menuId is enabled or not
|
||||
|
||||
|
||||
#### isOpen()
|
||||
|
||||
If the menuId is not specified, it returns true if ANY menu is currenly open.
|
||||
|
||||
|
||||
#### open()
|
||||
|
||||
Programatically open the Menu.
|
||||
Open the Menu.
|
||||
|
||||
|
||||
#### registerAnimation()
|
||||
|
||||
@@ -11,15 +11,16 @@ The MenuToggle component can be used to toggle a menu open or closed.
|
||||
|
||||
boolean
|
||||
|
||||
Automatically hides the content when the corresponding menu is not
|
||||
active
|
||||
Automatically hides the content when the corresponding menu is not active
|
||||
|
||||
|
||||
#### menu
|
||||
|
||||
string
|
||||
|
||||
Optional property that maps to a Menu's `menuId` prop. Can also be `left` or `right` for the menu side. This is used to find the correct menu to toggle
|
||||
Optional property that maps to a Menu's `menuId` prop.
|
||||
Can also be `left` or `right` for the menu side.
|
||||
This is used to find the correct menu to toggle
|
||||
|
||||
|
||||
## Attributes
|
||||
@@ -28,15 +29,16 @@ Optional property that maps to a Menu's `menuId` prop. Can also be `left` or `ri
|
||||
|
||||
boolean
|
||||
|
||||
Automatically hides the content when the corresponding menu is not
|
||||
active
|
||||
Automatically hides the content when the corresponding menu is not active
|
||||
|
||||
|
||||
#### menu
|
||||
|
||||
string
|
||||
|
||||
Optional property that maps to a Menu's `menuId` prop. Can also be `left` or `right` for the menu side. This is used to find the correct menu to toggle
|
||||
Optional property that maps to a Menu's `menuId` prop.
|
||||
Can also be `left` or `right` for the menu side.
|
||||
This is used to find the correct menu to toggle
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@ If true, the menu is disabled. Default `false`.
|
||||
|
||||
number
|
||||
|
||||
The edge threshold for dragging the menu open.
|
||||
If a drag/swipe happens over this value, the menu is not triggered.
|
||||
|
||||
|
||||
#### menuId
|
||||
|
||||
@@ -64,9 +67,8 @@ If true, swiping the menu is enabled. Default `true`.
|
||||
|
||||
string
|
||||
|
||||
The display type of the menu. Default varies based on the mode,
|
||||
see the `menuType` in the [config](../../config/Config). Available options:
|
||||
`"overlay"`, `"reveal"`, `"push"`.
|
||||
The display type of the menu.
|
||||
Available options: `"overlay"`, `"reveal"`, `"push"`.
|
||||
|
||||
|
||||
## Attributes
|
||||
@@ -89,6 +91,9 @@ If true, the menu is disabled. Default `false`.
|
||||
|
||||
number
|
||||
|
||||
The edge threshold for dragging the menu open.
|
||||
If a drag/swipe happens over this value, the menu is not triggered.
|
||||
|
||||
|
||||
#### menu-id
|
||||
|
||||
@@ -122,9 +127,8 @@ If true, swiping the menu is enabled. Default `true`.
|
||||
|
||||
string
|
||||
|
||||
The display type of the menu. Default varies based on the mode,
|
||||
see the `menuType` in the [config](../../config/Config). Available options:
|
||||
`"overlay"`, `"reveal"`, `"push"`.
|
||||
The display type of the menu.
|
||||
Available options: `"overlay"`, `"reveal"`, `"push"`.
|
||||
|
||||
|
||||
## Events
|
||||
|
||||
@@ -193,9 +193,6 @@ export class Modal implements OverlayInterface {
|
||||
* Returns a promise that resolves when the modal did dismiss. It also accepts a callback
|
||||
* that is called in the same circustances.
|
||||
*
|
||||
* ```
|
||||
* const {data, role} = await modal.onDidDismiss();
|
||||
* ```
|
||||
*/
|
||||
@Method()
|
||||
onDidDismiss(callback?: (detail: OverlayEventDetail) => void): Promise<OverlayEventDetail> {
|
||||
@@ -206,9 +203,6 @@ export class Modal implements OverlayInterface {
|
||||
* Returns a promise that resolves when the modal will dismiss. It also accepts a callback
|
||||
* that is called in the same circustances.
|
||||
*
|
||||
* ```
|
||||
* const {data, role} = await modal.onWillDismiss();
|
||||
* ```
|
||||
*/
|
||||
@Method()
|
||||
onWillDismiss(callback?: (detail: OverlayEventDetail) => void): Promise<OverlayEventDetail> {
|
||||
|
||||
@@ -240,20 +240,12 @@ Dismiss the modal overlay after it has been presented.
|
||||
Returns a promise that resolves when the modal did dismiss. It also accepts a callback
|
||||
that is called in the same circustances.
|
||||
|
||||
```
|
||||
const {data, role} = await modal.onDidDismiss();
|
||||
```
|
||||
|
||||
|
||||
#### onWillDismiss()
|
||||
|
||||
Returns a promise that resolves when the modal will dismiss. It also accepts a callback
|
||||
that is called in the same circustances.
|
||||
|
||||
```
|
||||
const {data, role} = await modal.onWillDismiss();
|
||||
```
|
||||
|
||||
|
||||
#### present()
|
||||
|
||||
|
||||
@@ -167,9 +167,6 @@ export class Picker implements OverlayInterface {
|
||||
* Returns a promise that resolves when the picker did dismiss. It also accepts a callback
|
||||
* that is called in the same circustances.
|
||||
*
|
||||
* ```
|
||||
* const {data, role} = await picker.onDidDismiss();
|
||||
* ```
|
||||
*/
|
||||
@Method()
|
||||
onDidDismiss(callback?: (detail: OverlayEventDetail) => void): Promise<OverlayEventDetail> {
|
||||
@@ -180,9 +177,6 @@ export class Picker implements OverlayInterface {
|
||||
* Returns a promise that resolves when the picker will dismiss. It also accepts a callback
|
||||
* that is called in the same circustances.
|
||||
*
|
||||
* ```
|
||||
* const {data, role} = await picker.onWillDismiss();
|
||||
* ```
|
||||
*/
|
||||
@Method()
|
||||
onWillDismiss(callback?: (detail: OverlayEventDetail) => void): Promise<OverlayEventDetail> {
|
||||
|
||||
@@ -215,20 +215,12 @@ Dismiss the picker overlay after it has been presented.
|
||||
Returns a promise that resolves when the picker did dismiss. It also accepts a callback
|
||||
that is called in the same circustances.
|
||||
|
||||
```
|
||||
const {data, role} = await picker.onDidDismiss();
|
||||
```
|
||||
|
||||
|
||||
#### onWillDismiss()
|
||||
|
||||
Returns a promise that resolves when the picker will dismiss. It also accepts a callback
|
||||
that is called in the same circustances.
|
||||
|
||||
```
|
||||
const {data, role} = await picker.onWillDismiss();
|
||||
```
|
||||
|
||||
|
||||
#### present()
|
||||
|
||||
|
||||
@@ -203,9 +203,6 @@ export class Popover implements OverlayInterface {
|
||||
* Returns a promise that resolves when the popover did dismiss. It also accepts a callback
|
||||
* that is called in the same circustances.
|
||||
*
|
||||
* ```
|
||||
* const {data, role} = await popover.onDidDismiss();
|
||||
* ```
|
||||
*/
|
||||
@Method()
|
||||
onDidDismiss(callback?: (detail: OverlayEventDetail) => void): Promise<OverlayEventDetail> {
|
||||
@@ -216,9 +213,6 @@ export class Popover implements OverlayInterface {
|
||||
* Returns a promise that resolves when the popover will dismiss. It also accepts a callback
|
||||
* that is called in the same circustances.
|
||||
*
|
||||
* ```
|
||||
* const {data, role} = await popover.onWillDismiss();
|
||||
* ```
|
||||
*/
|
||||
@Method()
|
||||
onWillDismiss(callback?: (detail: OverlayEventDetail) => void): Promise<OverlayEventDetail> {
|
||||
|
||||
@@ -270,20 +270,12 @@ Dismiss the popover overlay after it has been presented.
|
||||
Returns a promise that resolves when the popover did dismiss. It also accepts a callback
|
||||
that is called in the same circustances.
|
||||
|
||||
```
|
||||
const {data, role} = await popover.onDidDismiss();
|
||||
```
|
||||
|
||||
|
||||
#### onWillDismiss()
|
||||
|
||||
Returns a promise that resolves when the popover will dismiss. It also accepts a callback
|
||||
that is called in the same circustances.
|
||||
|
||||
```
|
||||
const {data, role} = await popover.onWillDismiss();
|
||||
```
|
||||
|
||||
|
||||
#### present()
|
||||
|
||||
|
||||
@@ -230,20 +230,12 @@ Dismiss the toast overlay after it has been presented.
|
||||
Returns a promise that resolves when the toast did dismiss. It also accepts a callback
|
||||
that is called in the same circustances.
|
||||
|
||||
```
|
||||
const {data, role} = await toast.onDidDismiss();
|
||||
```
|
||||
|
||||
|
||||
#### onWillDismiss()
|
||||
|
||||
Returns a promise that resolves when the toast will dismiss. It also accepts a callback
|
||||
that is called in the same circustances.
|
||||
|
||||
```
|
||||
const {data, role} = await toast.onWillDismiss();
|
||||
```
|
||||
|
||||
|
||||
#### present()
|
||||
|
||||
|
||||
@@ -162,9 +162,6 @@ export class Toast implements OverlayInterface {
|
||||
* Returns a promise that resolves when the toast did dismiss. It also accepts a callback
|
||||
* that is called in the same circustances.
|
||||
*
|
||||
* ```
|
||||
* const {data, role} = await toast.onDidDismiss();
|
||||
* ```
|
||||
*/
|
||||
@Method()
|
||||
onDidDismiss(callback?: (detail: OverlayEventDetail) => void): Promise<OverlayEventDetail> {
|
||||
@@ -175,9 +172,6 @@ export class Toast implements OverlayInterface {
|
||||
* Returns a promise that resolves when the toast will dismiss. It also accepts a callback
|
||||
* that is called in the same circustances.
|
||||
*
|
||||
* ```
|
||||
* const {data, role} = await toast.onWillDismiss();
|
||||
* ```
|
||||
*/
|
||||
@Method()
|
||||
onWillDismiss(callback?: (detail: OverlayEventDetail) => void): Promise<OverlayEventDetail> {
|
||||
|
||||
Reference in New Issue
Block a user