Skip to content

A platform for community discussion. Free, open, simple.

DEV: correct class on trigger of notifications-tracking (#31560)

Joffrey JAFFEUXc95c3c4311a7
diff --git a/app/assets/javascripts/discourse/app/components/notifications-tracking.gjs b/app/assets/javascripts/discourse/app/components/notifications-tracking.gjs
index 7c0e0293dbf..233ce126f61 100644
--- a/app/assets/javascripts/discourse/app/components/notifications-tracking.gjs
+++ b/app/assets/javascripts/discourse/app/components/notifications-tracking.gjs
@@ -42,17 +42,19 @@ class NotificationsTrackingTrigger extends Component {
}
<template>
- {{icon @selectedLevel.icon}}
-
- {{#if this.showFullTitle}}
- <span class="d-button-label">
- {{this.title}}
- </span>
- {{/if}}
-
- {{#if this.showCaret}}
- {{icon "angle-down" class="notifications-tracking-btn__caret"}}
- {{/if}}
+ <button class="btn btn-icon-text btn-default" ...attributes>
+ {{icon @selectedLevel.icon}}
+
+ {{#if this.showFullTitle}}
+ <span class="d-button-label">
+ {{this.title}}
+ </span>
+ {{/if}}
+
+ {{#if this.showCaret}}
+ {{icon "angle-down" class="notifications-tracking-btn__caret"}}
+ {{/if}}
+ </button>
</template>
}
@@ -108,19 +110,18 @@ export default class NotificationsTracking extends Component {
@onRegisterApi={{this.registerDmenuApi}}
@title={{@title}}
@autofocus={{false}}
+ @triggerComponent={{component
+ NotificationsTrackingTrigger
+ showFullTitle=@showFullTitle
+ showCaret=@showCaret
+ selectedLevel=this.selectedLevel
+ suffix=@suffix
+ prefix=@prefix
+ }}
data-level-id={{this.selectedLevel.id}}
data-level-name={{this.selectedLevel.key}}
...attributes
>
- <:trigger>
- <NotificationsTrackingTrigger
- @showFullTitle={{@showFullTitle}}
- @showCaret={{@showCaret}}
- @selectedLevel={{this.selectedLevel}}
- @suffix={{@suffix}}
- @prefix={{@prefix}}
- />
- </:trigger>
<:content>
<DropdownMenu as |dropdown|>
{{#each this.levels as |level|}}