From b72e09b4e34e92b0f0a935d566e57ecdc36f871b Mon Sep 17 00:00:00 2001 From: Konnor Rogers Date: Tue, 18 Jun 2024 23:19:48 -0400 Subject: [PATCH] prettier --- src/components/color-picker/color-picker.ts | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/components/color-picker/color-picker.ts b/src/components/color-picker/color-picker.ts index 791a54d17..199ba8806 100644 --- a/src/components/color-picker/color-picker.ts +++ b/src/components/color-picker/color-picker.ts @@ -1073,18 +1073,18 @@ export default class WaColorPicker extends WebAwesomeFormAssociatedElement { part="trigger-container form-control" slot="trigger" @click=${(e: Event) => { - const composedPath = e.composedPath() - const triggerButton = this.triggerButton - const triggerLabel = this.triggerLabel - if (composedPath.find((el) => el === triggerButton || el === triggerLabel)) { - return + const composedPath = e.composedPath(); + const triggerButton = this.triggerButton; + const triggerLabel = this.triggerLabel; + if (composedPath.find(el => el === triggerButton || el === triggerLabel)) { + return; } // Stop clicks from bubbling on anything except the button and the label. This is a hacky work around i may come to regret, but this "fixes" the issue of `` expecting all children in the "trigger slot" to open the trigger. [Konnor] - e.stopImmediatePropagation() + e.stopImmediatePropagation(); if (this.dropdown.open) { - this.dropdown.hide() + this.dropdown.hide(); } }} > @@ -1114,11 +1114,7 @@ export default class WaColorPicker extends WebAwesomeFormAssociatedElement { aria-describedby="help-text" > -
+
${this.helpText}