mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-30 06:12:03 +03:00
c3487fea41
refs https://github.com/TryGhost/Ghost/issues/14101 - migrated component to Glimmer - swapped usage of `ValidationState` mixin for `{{validation-status}}` modifier - updated modifier to accept custom error/success classes - removed unnecessary/unused code in the `gh-benefit-item.js` backing class
20 lines
437 B
JavaScript
20 lines
437 B
JavaScript
import Component from '@glimmer/component';
|
|
import {action} from '@ember/object';
|
|
|
|
export default class GhBenefitItem extends Component {
|
|
@action
|
|
handleLabelInput(event) {
|
|
this.updateLabel(event.target.value);
|
|
}
|
|
|
|
@action
|
|
updateLabel(value) {
|
|
this.args.updateLabel(value, this.args.benefitItem);
|
|
}
|
|
|
|
@action
|
|
clearLabelErrors() {
|
|
this.args.benefitItem.errors?.remove('name');
|
|
}
|
|
}
|