refactor: 💡 convert form actions component to nested structure

This commit is contained in:
Randall Morey committed 2020-09-23 17:13:49 -04:00
1 parent f1514da252
commit dbdd1f982a
3 files changed
+8 -7

No files matched your search

@@ -1,5 +1,5 @@
import Component from '@ember/component';
import layout from '../../../templates/components/rose/form/actions';
import Component from '@glimmer/component';
import { computed } from '@ember/object';
/**
* A set of two form action buttons for submit and cancel.
@@ -13,12 +13,13 @@ import layout from '../../../templates/components/rose/form/actions';
* @showCancel={{true}}
* @cancel=(fn @cancel) />
*/
export default Component.extend({
layout,
tagName: '',
export default class RoseFormActionsComponent extends Component {
/**
* @type {boolean}
*/
showCancel: true,
});
@computed('args.showCancel')
get showCancel() {
return this.args.showCancel ?? true;
}
}