From 2ed6397f74142512589c6e2dbfc55d35a4bb3bd8 Mon Sep 17 00:00:00 2001 From: ariellalgilmore Date: Wed, 24 Jan 2024 07:54:27 -0800 Subject: [PATCH] fix(slug-revert): use prefix --- .../src/components/date-picker/date-picker-input.ts | 4 ++-- .../carbon-web-components/src/components/dropdown/dropdown.ts | 4 ++-- .../carbon-web-components/src/components/select/select.ts | 4 ++-- .../src/components/text-input/text-input.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/carbon-web-components/src/components/date-picker/date-picker-input.ts b/packages/carbon-web-components/src/components/date-picker/date-picker-input.ts index 43df7e296fc..e1fc32fa24c 100644 --- a/packages/carbon-web-components/src/components/date-picker/date-picker-input.ts +++ b/packages/carbon-web-components/src/components/date-picker/date-picker-input.ts @@ -336,8 +336,8 @@ class CDSDatePickerInput extends FocusMixin(LitElement) { this.shadowRoot ?.querySelector("slot[name='slug']") ?.classList.toggle( - 'cds--slug--revert', - this.querySelector('cds-slug')?.hasAttribute('revert-active') + `${prefix}--slug--revert`, + this.querySelector(`${prefix}-slug`)?.hasAttribute('revert-active') ); } diff --git a/packages/carbon-web-components/src/components/dropdown/dropdown.ts b/packages/carbon-web-components/src/components/dropdown/dropdown.ts index 0d399e8a3e8..858f46ef46c 100644 --- a/packages/carbon-web-components/src/components/dropdown/dropdown.ts +++ b/packages/carbon-web-components/src/components/dropdown/dropdown.ts @@ -680,8 +680,8 @@ class CDSDropdown extends ValidityMixin( this.shadowRoot ?.querySelector("slot[name='slug']") ?.classList.toggle( - 'cds--slug--revert', - this.querySelector('cds-slug')?.hasAttribute('revert-active') + `${prefix}--slug--revert`, + this.querySelector(`${prefix}-slug`)?.hasAttribute('revert-active') ); } diff --git a/packages/carbon-web-components/src/components/select/select.ts b/packages/carbon-web-components/src/components/select/select.ts index fcf5cbe2745..8bce4b51bb4 100644 --- a/packages/carbon-web-components/src/components/select/select.ts +++ b/packages/carbon-web-components/src/components/select/select.ts @@ -346,8 +346,8 @@ class CDSSelect extends FormMixin(LitElement) { this.shadowRoot ?.querySelector("slot[name='slug']") ?.classList.toggle( - 'cds--slug--revert', - this.querySelector('cds-slug')?.hasAttribute('revert-active') + `${prefix}--slug--revert`, + this.querySelector(`${prefix}-slug`)?.hasAttribute('revert-active') ); } diff --git a/packages/carbon-web-components/src/components/text-input/text-input.ts b/packages/carbon-web-components/src/components/text-input/text-input.ts index 2e38b400708..247e0213699 100644 --- a/packages/carbon-web-components/src/components/text-input/text-input.ts +++ b/packages/carbon-web-components/src/components/text-input/text-input.ts @@ -506,8 +506,8 @@ class CDSTextInput extends ValidityMixin(FormMixin(LitElement)) { this.shadowRoot ?.querySelector("slot[name='slug']") ?.classList.toggle( - 'cds--slug--revert', - this.querySelector('cds-slug')?.hasAttribute('revert-active') + `${prefix}--slug--revert`, + this.querySelector(`${prefix}-slug`)?.hasAttribute('revert-active') ); }