From aaf3eee59da0c1960dfc905b9903bb64e8e31a3f Mon Sep 17 00:00:00 2001 From: mhartington Date: Thu, 31 May 2018 16:13:53 -0400 Subject: [PATCH] docs(): remove code blocks in docs --- core/package-lock.json | 6 +- core/src/components.d.ts | 80 +++++++++++++------ .../components/action-sheet/action-sheet.tsx | 6 -- core/src/components/action-sheet/readme.md | 8 -- core/src/components/alert/alert.tsx | 6 -- core/src/components/alert/readme.md | 8 -- core/src/components/label/readme.md | 10 +-- core/src/components/list-header/readme.md | 10 +-- .../components/loading-controller/readme.md | 6 ++ core/src/components/loading/readme.md | 4 - core/src/components/menu-controller/readme.md | 14 +++- core/src/components/menu-toggle/readme.md | 14 ++-- core/src/components/menu/readme.md | 16 ++-- core/src/components/modal/modal.tsx | 6 -- core/src/components/modal/readme.md | 8 -- core/src/components/picker/picker.tsx | 6 -- core/src/components/picker/readme.md | 8 -- core/src/components/popover/popover.tsx | 6 -- core/src/components/popover/readme.md | 8 -- core/src/components/toast/readme.md | 8 -- core/src/components/toast/toast.tsx | 6 -- 21 files changed, 98 insertions(+), 146 deletions(-) diff --git a/core/package-lock.json b/core/package-lock.json index e81cac384e..68fb6445aa 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -4501,9 +4501,9 @@ } }, "http-parser-js": { - "version": "0.4.12", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.12.tgz", - "integrity": "sha1-uc+/Sizybw/DSxDKFImid3HjR08=", + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.13.tgz", + "integrity": "sha1-O9bW/ebjFyyTNMOzO2wZPYD+ETc=", "dev": true }, "http-signature": { diff --git a/core/src/components.d.ts b/core/src/components.d.ts index dad9532e9a..bbbb5f31f7 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -185,11 +185,11 @@ declare global { */ 'leaveAnimation': AnimationBuilder; /** - * 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(); ``` + * Returns a promise that resolves when the action-sheet did dismiss. It also accepts a callback that is called in the same circustances. */ 'onDidDismiss': (callback?: ((detail: OverlayEventDetail) => void) | undefined) => Promise; /** - * 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(); ``` + * Returns a promise that resolves when the action-sheet will dismiss. It also accepts a callback that is called in the same circustances. */ 'onWillDismiss': (callback?: ((detail: OverlayEventDetail) => void) | undefined) => Promise; /** @@ -394,11 +394,11 @@ declare global { 'message': string; 'mode': Mode; /** - * 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(); ``` + * Returns a promise that resolves when the alert did dismiss. It also accepts a callback that is called in the same circumstances. */ 'onDidDismiss': (callback?: ((detail: OverlayEventDetail) => void) | undefined) => Promise; /** - * 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(); ``` + * Returns a promise that resolves when the alert will dismiss. It also accepts a callback that is called in the same circumstances. */ 'onWillDismiss': (callback?: ((detail: OverlayEventDetail) => void) | undefined) => Promise; 'overlayId': number; @@ -3071,12 +3071,12 @@ declare global { namespace StencilComponents { interface IonLabel { /** - * 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 */ 'color': Color; 'getText': () => 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). + * The mode determines which platform styles to use. Possible values are: `"ios"` or `"md"`. */ 'mode': Mode; /** @@ -3106,11 +3106,11 @@ declare global { namespace JSXElements { export interface IonLabelAttributes extends HTMLAttributes { /** - * 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 */ 'color'?: Color; /** - * 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). + * The mode determines which platform styles to use. Possible values are: `"ios"` or `"md"`. */ 'mode'?: Mode; /** @@ -3131,11 +3131,11 @@ declare global { namespace StencilComponents { interface IonListHeader { /** - * 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. */ 'color': Color; /** - * 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). + * The mode determines which platform styles to use. Possible values are: `"ios"` or `"md"`. */ 'mode': Mode; } @@ -3161,11 +3161,11 @@ declare global { namespace JSXElements { export interface IonListHeaderAttributes extends HTMLAttributes { /** - * 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. */ 'color'?: Color; /** - * 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). + * The mode determines which platform styles to use. Possible values are: `"ios"` or `"md"`. */ 'mode'?: Mode; } @@ -3228,8 +3228,17 @@ declare global { namespace StencilComponents { interface IonLoadingController { + /** + * Create a loading overlay with loading options. + */ 'create': (opts?: LoadingOptions | undefined) => Promise; + /** + * Dismiss the open loading overlay. + */ 'dismiss': (data?: any, role?: string | undefined, loadingId?: number) => Promise; + /** + * Get the most recently opened loading overlay. + */ 'getTop': () => HTMLIonLoadingElement; } } @@ -3297,7 +3306,7 @@ declare global { */ 'leaveAnimation': AnimationBuilder; /** - * 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(); ``` + * Returns a promise that resolves when the loading did dismiss. It also accepts a callback that is called in the same circustances. */ 'onDidDismiss': (callback?: ((detail: OverlayEventDetail) => void) | undefined) => Promise; /** @@ -3478,7 +3487,7 @@ declare global { '_setOpen': (menu: Menu, shouldOpen: boolean, animated: boolean) => Promise; '_unregister': (menu: Menu) => void; /** - * Programatically 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. + * 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. */ 'close': (menuId?: string | undefined) => Promise; 'createAnimation': (type: string, menuCmp: Menu) => Promise; @@ -3490,13 +3499,28 @@ declare global { * Used to get a menu instance. If a `menuId` is not provided then it'll return the first menu found. If a `menuId` is `left` or `right`, then it'll return the enabled menu on that side. Otherwise, if a `menuId` is provided, then it'll try to find the menu using the menu's `id` property. If a menu is not found then it'll return `null`. */ 'get': (menuId?: string | undefined) => HTMLIonMenuElement | null; + /** + * Returns an array of all menu instances. + */ 'getMenus': () => HTMLIonMenuElement[]; + /** + * Returns the instance of the menu already opened, otherwise `null`. + */ 'getOpen': () => HTMLIonMenuElement | null; + /** + * If any menu is currently animating + */ 'isAnimating': () => boolean; + /** + * Returns true or false if the menuId is enabled or not + */ 'isEnabled': (menuId?: string | undefined) => boolean; + /** + * If the menuId is not specified, it returns true if ANY menu is currenly open. + */ 'isOpen': (menuId?: string | undefined) => boolean; /** - * Programatically open the Menu. + * Open the Menu. */ 'open': (menuId?: string | undefined) => Promise; 'registerAnimation': (name: string, animation: AnimationBuilder) => void; @@ -3598,6 +3622,9 @@ declare global { 'disabled': boolean; 'isActive': () => boolean; 'isOpen': () => boolean; + /** + * The edge threshold for dragging the menu open. If a drag/swipe happens over this value, the menu is not triggered. + */ 'maxEdgeStart': number; /** * An id for the menu. @@ -3619,7 +3646,7 @@ declare global { 'swipeEnabled': boolean; 'toggle': (animated?: boolean) => Promise; /** - * 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"`. */ 'type': string; } @@ -3652,6 +3679,9 @@ declare global { * If true, the menu is disabled. Default `false`. */ 'disabled'?: boolean; + /** + * The edge threshold for dragging the menu open. If a drag/swipe happens over this value, the menu is not triggered. + */ 'maxEdgeStart'?: number; /** * An id for the menu. @@ -3679,7 +3709,7 @@ declare global { */ 'swipeEnabled'?: boolean; /** - * 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"`. */ 'type'?: string; } @@ -3765,11 +3795,11 @@ declare global { */ 'mode': Mode; /** - * 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(); ``` + * Returns a promise that resolves when the modal did dismiss. It also accepts a callback that is called in the same circustances. */ 'onDidDismiss': (callback?: ((detail: OverlayEventDetail) => void) | undefined) => Promise; /** - * 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(); ``` + * Returns a promise that resolves when the modal will dismiss. It also accepts a callback that is called in the same circustances. */ 'onWillDismiss': (callback?: ((detail: OverlayEventDetail) => void) | undefined) => Promise; 'overlayId': number; @@ -4199,11 +4229,11 @@ declare global { */ 'leaveAnimation': AnimationBuilder; /** - * 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(); ``` + * Returns a promise that resolves when the picker did dismiss. It also accepts a callback that is called in the same circustances. */ 'onDidDismiss': (callback?: ((detail: OverlayEventDetail) => void) | undefined) => Promise; /** - * 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(); ``` + * Returns a promise that resolves when the picker will dismiss. It also accepts a callback that is called in the same circustances. */ 'onWillDismiss': (callback?: ((detail: OverlayEventDetail) => void) | undefined) => Promise; 'overlayId': number; @@ -4390,11 +4420,11 @@ declare global { */ 'mode': Mode; /** - * 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(); ``` + * Returns a promise that resolves when the popover did dismiss. It also accepts a callback that is called in the same circustances. */ 'onDidDismiss': (callback?: ((detail: OverlayEventDetail) => void) | undefined) => Promise; /** - * 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(); ``` + * Returns a promise that resolves when the popover will dismiss. It also accepts a callback that is called in the same circustances. */ 'onWillDismiss': (callback?: ((detail: OverlayEventDetail) => void) | undefined) => Promise; 'overlayId': number; @@ -7108,11 +7138,11 @@ declare global { */ 'message': string; /** - * 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(); ``` + * Returns a promise that resolves when the toast did dismiss. It also accepts a callback that is called in the same circustances. */ 'onDidDismiss': (callback?: ((detail: OverlayEventDetail) => void) | undefined) => Promise; /** - * 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(); ``` + * Returns a promise that resolves when the toast will dismiss. It also accepts a callback that is called in the same circustances. */ 'onWillDismiss': (callback?: ((detail: OverlayEventDetail) => void) | undefined) => Promise; 'overlayId': number; diff --git a/core/src/components/action-sheet/action-sheet.tsx b/core/src/components/action-sheet/action-sheet.tsx index cadc6c3ff8..f7acd23251 100644 --- a/core/src/components/action-sheet/action-sheet.tsx +++ b/core/src/components/action-sheet/action-sheet.tsx @@ -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 { @@ -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 { diff --git a/core/src/components/action-sheet/readme.md b/core/src/components/action-sheet/readme.md index 6e4bce5e08..9e28f0e550 100644 --- a/core/src/components/action-sheet/readme.md +++ b/core/src/components/action-sheet/readme.md @@ -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() diff --git a/core/src/components/alert/alert.tsx b/core/src/components/alert/alert.tsx index 1056eaea7e..7ffc559aff 100644 --- a/core/src/components/alert/alert.tsx +++ b/core/src/components/alert/alert.tsx @@ -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 { @@ -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 { diff --git a/core/src/components/alert/readme.md b/core/src/components/alert/readme.md index a96c2de1e3..dc52384070 100644 --- a/core/src/components/alert/readme.md +++ b/core/src/components/alert/readme.md @@ -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() diff --git a/core/src/components/label/readme.md b/core/src/components/label/readme.md index c0601bba57..776c6fc99d 100644 --- a/core/src/components/label/readme.md +++ b/core/src/components/label/readme.md @@ -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 diff --git a/core/src/components/list-header/readme.md b/core/src/components/list-header/readme.md index 73a44642de..c3339fd008 100644 --- a/core/src/components/list-header/readme.md +++ b/core/src/components/list-header/readme.md @@ -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). diff --git a/core/src/components/loading-controller/readme.md b/core/src/components/loading-controller/readme.md index 67ecd80215..2e04719c1c 100644 --- a/core/src/components/loading-controller/readme.md +++ b/core/src/components/loading-controller/readme.md @@ -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. + ---------------------------------------------- diff --git a/core/src/components/loading/readme.md b/core/src/components/loading/readme.md index 529199050a..85336df492 100644 --- a/core/src/components/loading/readme.md +++ b/core/src/components/loading/readme.md @@ -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() diff --git a/core/src/components/menu-controller/readme.md b/core/src/components/menu-controller/readme.md index 7cd3921dbc..8507623aa3 100644 --- a/core/src/components/menu-controller/readme.md +++ b/core/src/components/menu-controller/readme.md @@ -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() diff --git a/core/src/components/menu-toggle/readme.md b/core/src/components/menu-toggle/readme.md index 41692c0424..e4ea9be170 100644 --- a/core/src/components/menu-toggle/readme.md +++ b/core/src/components/menu-toggle/readme.md @@ -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 diff --git a/core/src/components/menu/readme.md b/core/src/components/menu/readme.md index a1191b95f7..71de8630e8 100644 --- a/core/src/components/menu/readme.md +++ b/core/src/components/menu/readme.md @@ -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 diff --git a/core/src/components/modal/modal.tsx b/core/src/components/modal/modal.tsx index 1a5eeb25a0..bebf9b2630 100644 --- a/core/src/components/modal/modal.tsx +++ b/core/src/components/modal/modal.tsx @@ -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 { @@ -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 { diff --git a/core/src/components/modal/readme.md b/core/src/components/modal/readme.md index 587d7793ec..31e76600ed 100644 --- a/core/src/components/modal/readme.md +++ b/core/src/components/modal/readme.md @@ -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() diff --git a/core/src/components/picker/picker.tsx b/core/src/components/picker/picker.tsx index 15007b8eb9..ddd3101223 100644 --- a/core/src/components/picker/picker.tsx +++ b/core/src/components/picker/picker.tsx @@ -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 { @@ -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 { diff --git a/core/src/components/picker/readme.md b/core/src/components/picker/readme.md index 5a92806846..25d4a23ec1 100644 --- a/core/src/components/picker/readme.md +++ b/core/src/components/picker/readme.md @@ -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() diff --git a/core/src/components/popover/popover.tsx b/core/src/components/popover/popover.tsx index faf645bf4f..16bd90c805 100644 --- a/core/src/components/popover/popover.tsx +++ b/core/src/components/popover/popover.tsx @@ -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 { @@ -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 { diff --git a/core/src/components/popover/readme.md b/core/src/components/popover/readme.md index 59729ad60f..a02b5c370e 100644 --- a/core/src/components/popover/readme.md +++ b/core/src/components/popover/readme.md @@ -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() diff --git a/core/src/components/toast/readme.md b/core/src/components/toast/readme.md index a86ec0d6a2..995689e4a3 100644 --- a/core/src/components/toast/readme.md +++ b/core/src/components/toast/readme.md @@ -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() diff --git a/core/src/components/toast/toast.tsx b/core/src/components/toast/toast.tsx index 59e1e884a4..8af7e7f7e1 100644 --- a/core/src/components/toast/toast.tsx +++ b/core/src/components/toast/toast.tsx @@ -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 { @@ -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 {