Ghost/ghost/admin/app/components/announcement-settings/background.js
Elena Baidakova ecb42a3680
Wired announcement api to admin ui (#16678)
refs TryGhost/Team#3052


<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 7173288</samp>

This pull request adds new components and settings for the announcement
bar feature, which allows the user to customize the content, background,
and visibility of a banner that appears on the site.
2023-04-19 19:45:34 +04:00

27 lines
689 B
JavaScript

import Component from '@glimmer/component';
import {action} from '@ember/object';
import {inject as service} from '@ember/service';
export default class AnnouncementSettingsBackgroundComponent extends Component {
@service settings;
get background() {
return this.settings.announcementBackground;
}
get options() {
return [
{value: 'accent', label: 'Accent'},
{value: 'dark', label: 'Dark'},
{value: 'light', label: 'Light'}
];
}
@action
setBackground(event) {
this.settings.announcementBackground = event.target.value;
this.settings.save();
this.args.onChange?.();
}
}