2021-06-07 20:52:37 +03:00
|
|
|
import Component from '@glimmer/component';
|
|
|
|
import {action} from '@ember/object';
|
|
|
|
|
|
|
|
export default class GhFontSelector extends Component {
|
|
|
|
get options() {
|
|
|
|
return [{
|
|
|
|
name: 'Elegant serif',
|
2021-06-08 00:05:53 +03:00
|
|
|
description: 'Beautiful lines with great readability',
|
2021-06-07 20:52:37 +03:00
|
|
|
value: 'serif'
|
|
|
|
}, {
|
|
|
|
name: 'Clean sans-serif',
|
|
|
|
description: 'A more minimal style with sharp lines',
|
|
|
|
value: 'sans_serif'
|
|
|
|
}];
|
|
|
|
}
|
|
|
|
|
|
|
|
get selectedOption() {
|
|
|
|
return this.options.find(o => o.value === this.args.selected);
|
|
|
|
}
|
|
|
|
|
|
|
|
@action
|
|
|
|
selectOption(option) {
|
|
|
|
this.args.onChange(option.value);
|
|
|
|
}
|
|
|
|
}
|