diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 8ca4a20bae..c7c04d78bd 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -97,6 +97,10 @@ declare global { } interface IonActionSheet { + /** + * If true, the action sheet will be dismissed when the backdrop is clicked. Defaults to `true`. + */ + 'backdropDismiss': boolean; /** * An array of buttons for the action sheet. */ @@ -109,10 +113,6 @@ declare global { * Dismiss the action sheet overlay after it has been presented. */ 'dismiss': (data?: any, role?: string | undefined) => Promise; - /** - * If true, the action sheet will be dismissed when the backdrop is clicked. Defaults to `true`. - */ - 'enableBackdropDismiss': boolean; /** * Animation to use when the action sheet is presented. */ @@ -175,6 +175,10 @@ declare global { } interface IonAlert { + /** + * If true, the alert will be dismissed when the backdrop is clicked. Defaults to `true`. + */ + 'backdropDismiss': boolean; /** * Array of buttons to be added to the alert. */ @@ -187,10 +191,6 @@ declare global { * Dismiss the alert overlay after it has been presented. */ 'dismiss': (data?: any, role?: string | undefined) => Promise; - /** - * If true, the alert will be dismissed when the backdrop is clicked. Defaults to `true`. - */ - 'enableBackdropDismiss': boolean; /** * Animation to use when the alert is presented. */ @@ -1188,6 +1188,10 @@ declare global { } interface IonLoading { + /** + * If true, the loading indicator will be dismissed when the backdrop is clicked. Defaults to `false`. + */ + 'backdropDismiss': boolean; /** * Optional text content to display in the loading indicator. */ @@ -1204,10 +1208,6 @@ declare global { * Number of milliseconds to wait before dismissing the loading indicator. */ 'duration': number; - /** - * If true, the loading indicator will be dismissed when the backdrop is clicked. Defaults to `false`. - */ - 'enableBackdropDismiss': boolean; /** * Animation to use when the loading indicator is presented. */ @@ -1388,6 +1388,10 @@ declare global { } interface IonModal { + /** + * If true, the modal will be dismissed when the backdrop is clicked. Defaults to `true`. + */ + 'backdropDismiss': boolean; /** * The component to display inside of the modal. */ @@ -1405,10 +1409,6 @@ declare global { * Dismiss the modal overlay after it has been presented. */ 'dismiss': (data?: any, role?: string | undefined) => Promise; - /** - * If true, the modal will be dismissed when the backdrop is clicked. Defaults to `true`. - */ - 'enableBackdropDismiss': boolean; /** * Animation to use when the modal is presented. */ @@ -1568,6 +1568,10 @@ declare global { } interface IonPicker { + /** + * If true, the picker will be dismissed when the backdrop is clicked. Defaults to `true`. + */ + 'backdropDismiss': boolean; /** * Array of buttons to be displayed at the top of the picker. */ @@ -1588,10 +1592,6 @@ declare global { * Number of milliseconds to wait before dismissing the picker. */ 'duration': number; - /** - * If true, the picker will be dismissed when the backdrop is clicked. Defaults to `true`. - */ - 'enableBackdropDismiss': boolean; /** * Animation to use when the picker is presented. */ @@ -1647,6 +1647,10 @@ declare global { } interface IonPopover { + /** + * If true, the popover will be dismissed when the backdrop is clicked. Defaults to `true`. + */ + 'backdropDismiss': boolean; /** * The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). */ @@ -1668,10 +1672,6 @@ declare global { * Dismiss the popover overlay after it has been presented. */ 'dismiss': (data?: any, role?: string | undefined) => Promise; - /** - * If true, the popover will be dismissed when the backdrop is clicked. Defaults to `true`. - */ - 'enableBackdropDismiss': boolean; /** * Animation to use when the popover is presented. */ @@ -3578,6 +3578,10 @@ declare global { } export interface IonActionSheetAttributes extends HTMLAttributes { + /** + * If true, the action sheet will be dismissed when the backdrop is clicked. Defaults to `true`. + */ + 'backdropDismiss'?: boolean; /** * An array of buttons for the action sheet. */ @@ -3586,10 +3590,6 @@ declare global { * Additional classes to apply for custom CSS. If multiple classes are provided they should be separated by spaces. */ 'cssClass'?: string | string[]; - /** - * If true, the action sheet will be dismissed when the backdrop is clicked. Defaults to `true`. - */ - 'enableBackdropDismiss'?: boolean; /** * Animation to use when the action sheet is presented. */ @@ -3653,6 +3653,10 @@ declare global { } export interface IonAlertAttributes extends HTMLAttributes { + /** + * If true, the alert will be dismissed when the backdrop is clicked. Defaults to `true`. + */ + 'backdropDismiss'?: boolean; /** * Array of buttons to be added to the alert. */ @@ -3661,10 +3665,6 @@ declare global { * Additional classes to apply for custom CSS. If multiple classes are provided they should be separated by spaces. */ 'cssClass'?: string | string[]; - /** - * If true, the alert will be dismissed when the backdrop is clicked. Defaults to `true`. - */ - 'enableBackdropDismiss'?: boolean; /** * Animation to use when the alert is presented. */ @@ -4698,6 +4698,10 @@ declare global { } export interface IonLoadingAttributes extends HTMLAttributes { + /** + * If true, the loading indicator will be dismissed when the backdrop is clicked. Defaults to `false`. + */ + 'backdropDismiss'?: boolean; /** * Optional text content to display in the loading indicator. */ @@ -4710,10 +4714,6 @@ declare global { * Number of milliseconds to wait before dismissing the loading indicator. */ 'duration'?: number; - /** - * If true, the loading indicator will be dismissed when the backdrop is clicked. Defaults to `false`. - */ - 'enableBackdropDismiss'?: boolean; /** * Animation to use when the loading indicator is presented. */ @@ -4851,6 +4851,10 @@ declare global { } export interface IonModalAttributes extends HTMLAttributes { + /** + * If true, the modal will be dismissed when the backdrop is clicked. Defaults to `true`. + */ + 'backdropDismiss'?: boolean; /** * The component to display inside of the modal. */ @@ -4864,10 +4868,6 @@ declare global { */ 'cssClass'?: string | string[]; 'delegate'?: FrameworkDelegate; - /** - * If true, the modal will be dismissed when the backdrop is clicked. Defaults to `true`. - */ - 'enableBackdropDismiss'?: boolean; /** * Animation to use when the modal is presented. */ @@ -4990,6 +4990,10 @@ declare global { } export interface IonPickerAttributes extends HTMLAttributes { + /** + * If true, the picker will be dismissed when the backdrop is clicked. Defaults to `true`. + */ + 'backdropDismiss'?: boolean; /** * Array of buttons to be displayed at the top of the picker. */ @@ -5006,10 +5010,6 @@ declare global { * Number of milliseconds to wait before dismissing the picker. */ 'duration'?: number; - /** - * If true, the picker will be dismissed when the backdrop is clicked. Defaults to `true`. - */ - 'enableBackdropDismiss'?: boolean; /** * Animation to use when the picker is presented. */ @@ -5062,6 +5062,10 @@ declare global { } export interface IonPopoverAttributes extends HTMLAttributes { + /** + * If true, the popover will be dismissed when the backdrop is clicked. Defaults to `true`. + */ + 'backdropDismiss'?: boolean; /** * The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). */ @@ -5079,10 +5083,6 @@ declare global { */ 'cssClass'?: string | string[]; 'delegate'?: FrameworkDelegate; - /** - * If true, the popover will be dismissed when the backdrop is clicked. Defaults to `true`. - */ - 'enableBackdropDismiss'?: boolean; /** * Animation to use when the popover is presented. */ diff --git a/core/src/components/action-sheet/action-sheet-interface.ts b/core/src/components/action-sheet/action-sheet-interface.ts index 6d4128dddd..e430370acd 100644 --- a/core/src/components/action-sheet/action-sheet-interface.ts +++ b/core/src/components/action-sheet/action-sheet-interface.ts @@ -4,7 +4,7 @@ export interface ActionSheetOptions { subHeader?: string; cssClass?: string | string[]; buttons: (ActionSheetButton | string)[]; - enableBackdropDismiss?: boolean; + backdropDismiss?: boolean; translucent?: boolean; } diff --git a/core/src/components/action-sheet/action-sheet.tsx b/core/src/components/action-sheet/action-sheet.tsx index 772c4fd6da..9684ffde56 100644 --- a/core/src/components/action-sheet/action-sheet.tsx +++ b/core/src/components/action-sheet/action-sheet.tsx @@ -63,7 +63,7 @@ export class ActionSheet implements OverlayInterface { /** * If true, the action sheet will be dismissed when the backdrop is clicked. Defaults to `true`. */ - @Prop() enableBackdropDismiss = true; + @Prop() backdropDismiss = true; /** * Title for the action sheet. @@ -224,7 +224,7 @@ export class ActionSheet implements OverlayInterface { const buttons = allButtons.filter(b => b.role !== 'cancel'); return [ - , + ,