Kris f6c5eca485
DEV: add btn-default classes to buttons using default styling (#31039)
All of these buttons use our default grey background styling, but aren't
carrying the `btn-default` class, which makes them easier to target in
themes. This PR adds the class.
2025-01-28 15:40:34 -05:00

36 lines
852 B
Plaintext

import Component from "@glimmer/component";
import { action } from "@ember/object";
import { service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import DButton from "discourse/components/d-button";
import icon from "discourse/helpers/d-icon";
export default class AdminNotice extends Component {
@service currentUser;
@action
dismiss() {
this.args.dismissCallback(this.args.problem);
}
get canDismiss() {
return this.currentUser.admin;
}
<template>
<div class="notice">
<div class="message">
{{if @icon (icon @icon)}}
{{htmlSafe @problem.message}}
</div>
{{#if this.canDismiss}}
<DButton
@action={{this.dismiss}}
@label="admin.dashboard.dismiss_notice"
class="btn-default"
/>
{{/if}}
</div>
</template>
}