MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / Toast

Class Toast

core/src/components/toast/toast.tsx:67–782  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 shadow: true,
66})
67export class Toast implements ComponentInterface, OverlayInterface {
68 private readonly delegateController = createDelegateController(this);
69 private readonly lockController = createLockController();
70 private readonly triggerController = createTriggerController();
71 private customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
72 private durationTimeout?: ReturnType<typeof setTimeout>;
73 private gesture?: Gesture;
74
75 /**
76 * Holds the position of the toast calculated in the present
77 * animation, to be passed along to the dismiss animation so
78 * we don't have to calculate the position twice.
79 */
80 private lastPresentedPosition?: ToastAnimationPosition;
81
82 presented = false;
83
84 /**
85 * When `true`, content inside of .toast-content
86 * will have aria-hidden elements removed causing
87 * screen readers to announce the remaining content.
88 */
89 @State() revealContentToScreenReader = false;
90
91 @Element() el!: HTMLIonToastElement;
92
93 /**
94 * @internal
95 */
96 @Prop() overlayIndex!: number;
97
98 /** @internal */
99 @Prop() delegate?: FrameworkDelegate;
100
101 /** @internal */
102 @Prop() hasController = false;
103
104 /**
105 * The color to use from your application's color palette.
106 * Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
107 * For more information on colors, see [theming](/docs/theming/basics).
108 */
109 @Prop({ reflect: true }) color?: Color;
110
111 /**
112 * Animation to use when the toast is presented.
113 */
114 @Prop() enterAnimation?: AnimationBuilder;
115
116 /**
117 * Animation to use when the toast is dismissed.
118 */
119 @Prop() leaveAnimation?: AnimationBuilder;
120
121 /**
122 * Additional classes to apply for custom CSS. If multiple classes are
123 * provided they should be separated by spaces.
124 */

Callers

nothing calls this directly

Calls 12

getButtonsMethod · 0.95
callButtonHandlerMethod · 0.95
dismissMethod · 0.95
createDelegateControllerFunction · 0.90
createLockControllerFunction · 0.90
createTriggerControllerFunction · 0.90
isCancelFunction · 0.90
getMethod · 0.65
enableMethod · 0.65
destroyMethod · 0.65
getNumberMethod · 0.45

Tested by

no test coverage detected