mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 09:34:19 +08:00
feat(toast): add ability to use toast inline (#26215)
This commit is contained in:
@ -23,7 +23,6 @@ function generateOverlays() {
|
||||
},
|
||||
{
|
||||
tag: 'ion-toast',
|
||||
controller: 'toastController',
|
||||
name: 'IonToast'
|
||||
},
|
||||
{
|
||||
|
@ -7,7 +7,6 @@ import {
|
||||
JSX,
|
||||
alertController,
|
||||
pickerController,
|
||||
toastController,
|
||||
} from '@ionic/core/components';
|
||||
|
||||
import { defineCustomElement as defineIonActionSheetCustomElement } from '@ionic/core/components/ion-action-sheet.js'
|
||||
@ -28,7 +27,7 @@ export const IonLoading = /*@__PURE__*/ defineOverlayContainer<JSX.IonLoading>('
|
||||
|
||||
export const IonPicker = /*@__PURE__*/ defineOverlayContainer<JSX.IonPicker>('ion-picker', defineIonPickerCustomElement, ['animated', 'backdropDismiss', 'buttons', 'columns', 'cssClass', 'duration', 'enterAnimation', 'htmlAttributes', 'keyboardClose', 'leaveAnimation', 'mode', 'showBackdrop'], pickerController);
|
||||
|
||||
export const IonToast = /*@__PURE__*/ defineOverlayContainer<JSX.IonToast>('ion-toast', defineIonToastCustomElement, ['animated', 'buttons', 'color', 'cssClass', 'duration', 'enterAnimation', 'header', 'htmlAttributes', 'icon', 'keyboardClose', 'leaveAnimation', 'message', 'mode', 'position', 'translucent'], toastController);
|
||||
export const IonToast = /*@__PURE__*/ defineOverlayContainer<JSX.IonToast>('ion-toast', defineIonToastCustomElement, ['animated', 'buttons', 'color', 'cssClass', 'duration', 'enterAnimation', 'header', 'htmlAttributes', 'icon', 'isOpen', 'keyboardClose', 'leaveAnimation', 'message', 'mode', 'position', 'translucent', 'trigger']);
|
||||
|
||||
export const IonModal = /*@__PURE__*/ defineOverlayContainer<JSX.IonModal>('ion-modal', defineIonModalCustomElement, ['animated', 'backdropBreakpoint', 'backdropDismiss', 'breakpoints', 'canDismiss', 'enterAnimation', 'handle', 'handleBehavior', 'htmlAttributes', 'initialBreakpoint', 'isOpen', 'keepContentsMounted', 'keyboardClose', 'leaveAnimation', 'mode', 'presentingElement', 'showBackdrop', 'trigger']);
|
||||
|
||||
|
@ -86,11 +86,11 @@ describe('Overlays', () => {
|
||||
cy.get('ion-radio#controller').click();
|
||||
|
||||
cy.get('ion-button#present-overlay').click();
|
||||
cy.get('ion-toast').should('exist');
|
||||
cy.get('ion-toast.ion-toast-controller').should('exist');
|
||||
|
||||
cy.get('ion-toast').shadow().find('button').click();
|
||||
cy.get('ion-toast.ion-toast-controller').shadow().find('button').click();
|
||||
|
||||
cy.get('ion-toast').should('not.exist');
|
||||
cy.get('ion-toast.ion-toast-controller').should('not.exist');
|
||||
});
|
||||
|
||||
it(`should open and close ion-alert via component`, () => {
|
||||
@ -122,7 +122,7 @@ describe('Overlays', () => {
|
||||
|
||||
cy.get('ion-toast').shadow().find('button').click();
|
||||
|
||||
cy.get('ion-toast').should('not.exist');
|
||||
cy.get('ion-toast').should('not.be.visible');
|
||||
});
|
||||
|
||||
it('should pass props to modal via controller', () => {
|
||||
|
Reference in New Issue
Block a user