discourse/app/assets/javascripts/admin/addon/components/install-theme-item.gjs
Alan Guo Xiang Tan dab361ac41
UX: Creating a new theme/component should redirect to theme edit route (#34353)
Prior to this change, creating a new theme or theme component was
causing the user to stay on the index route.
2025-08-19 11:30:44 +08:00

28 lines
736 B
Text
Vendored

import Component from "@glimmer/component";
import RadioButton from "discourse/components/radio-button";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class InstallThemeItem extends Component {
get classes() {
return `install-theme-item install-theme-item__${this.args.value}`;
}
<template>
<div class={{this.classes}}>
<RadioButton
@name="install-items"
@id={{@value}}
@value={{@value}}
@selection={{@selection}}
/>
<label class="radio" for={{@value}}>
{{#if @showIcon}}
{{icon "plus"}}
{{/if}}
{{i18n @label}}
</label>
{{icon "caret-right"}}
</div>
</template>
}