File tree Expand file tree Collapse file tree
packages/web-components/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/**
22 * @license
33 *
4- * Copyright IBM Corp. 2020, 2024
4+ * Copyright IBM Corp. 2020, 2025
55 *
66 * This source code is licensed under the Apache-2.0 license found in the
77 * LICENSE file in the root directory of this source tree.
@@ -45,6 +45,18 @@ class C4DCardFooter extends C4DLinkWithIcon {
4545 return Boolean ( parentHref ) && ( ! href || parentHref === href ) ;
4646 }
4747
48+ /**
49+ * Contact Module won't work if card-footer has parent-href attribute
50+ * this function removes parent-href if the cta type is 'chat' or 'contact'
51+ */
52+ protected _cleanParentHrefForContactModule ( ) {
53+ const { ctaType } = this ;
54+
55+ if ( ctaType === 'chat' || ctaType === 'contact' ) {
56+ this . removeAttribute ( 'parent-href' ) ;
57+ }
58+ }
59+
4860 /**
4961 * Handles `slotchange` event on the default `<slot>`.
5062 */
@@ -134,6 +146,8 @@ class C4DCardFooter extends C4DLinkWithIcon {
134146 if ( iconInline ) {
135147 targetNode ! . classList . add ( `${ prefix } --link-with-icon--inline-icon` ) ;
136148 }
149+
150+ this . _cleanParentHrefForContactModule ( ) ;
137151 }
138152
139153 static get stableSelector ( ) {
Original file line number Diff line number Diff line change 11/**
22 * @license
33 *
4- * Copyright IBM Corp. 2020, 2023
4+ * Copyright IBM Corp. 2020, 2025
55 *
66 * This source code is licensed under the Apache-2.0 license found in the
77 * LICENSE file in the root directory of this source tree.
@@ -101,6 +101,11 @@ export enum CTA_TYPE {
101101 */
102102 CHAT = 'chat' ,
103103
104+ /**
105+ * Another CTA variation with a chat icon, whose action opens the chat widget.
106+ */
107+ CONTACT = 'contact' ,
108+
104109 /**
105110 * CTA with a phone icon, whose action opens default telephony app.
106111 */
You can’t perform that action at this time.
0 commit comments