From e9faf54d0a7409521706ce9c8b0d26f3fbe9ba41 Mon Sep 17 00:00:00 2001
From: luisbytes <137983537+luisbytes@users.noreply.github.com>
Date: Thu, 10 Aug 2023 11:26:01 -0500
Subject: [PATCH] feat(toast): add shadow part for cancel button (#27921)
resolves #27920
---
core/api.txt | 1 +
core/src/components/toast/test/toast.spec.tsx | 15 +++++++++++++++
core/src/components/toast/toast.tsx | 7 ++++++-
3 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/core/api.txt b/core/api.txt
index 55ace969a9..47b1307e5a 100644
--- a/core/api.txt
+++ b/core/api.txt
@@ -1471,6 +1471,7 @@ ion-toast,css-prop,--start
ion-toast,css-prop,--white-space
ion-toast,css-prop,--width
ion-toast,part,button
+ion-toast,part,button cancel
ion-toast,part,container
ion-toast,part,header
ion-toast,part,icon
diff --git a/core/src/components/toast/test/toast.spec.tsx b/core/src/components/toast/test/toast.spec.tsx
index 7955acf3d3..d59e7d32e9 100644
--- a/core/src/components/toast/test/toast.spec.tsx
+++ b/core/src/components/toast/test/toast.spec.tsx
@@ -129,3 +129,18 @@ describe('toast: htmlAttributes', () => {
await expect(toast.getAttribute('data-testid')).toBe('basic-toast');
});
});
+
+describe('toast: button cancel', () => {
+ it('should render the cancel button with part button-cancel', async () => {
+ const page = await newSpecPage({
+ components: [Toast],
+ template: () =>