Skip to content

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

UX: Use correct syntax for selected (#36891)

Jordan Vidrineb9284e54e908
diff --git a/plugins/discourse-ai/assets/javascripts/discourse/components/ai-gist-toggle.gjs b/plugins/discourse-ai/assets/javascripts/discourse/components/ai-gist-toggle.gjs
index 0d60e9cab4e..f360b6bc480 100644
--- a/plugins/discourse-ai/assets/javascripts/discourse/components/ai-gist-toggle.gjs
+++ b/plugins/discourse-ai/assets/javascripts/discourse/components/ai-gist-toggle.gjs
@@ -67,13 +67,14 @@ export default class AiGistToggle extends Component {
<:content>
<DropdownMenu as |dropdown|>
{{#each this.buttons as |button|}}
- <dropdown.item>
+ <dropdown.item
+ class={{if (eq this.currentButton.id button.id) "--selected"}}
+ >
<DButton
@label={{button.label}}
@icon={{button.icon}}
class="btn-transparent
- {{if button.description '--with-description'}}
- {{if (eq this.currentButton.id button.id) '--active'}}"
+ {{if button.description '--with-description'}}"
@action={{fn this.onSelect button.id}}
>
{{#if button.description}}