We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0dbe9f commit bd389faCopy full SHA for bd389fa
addon/components/es-button.js
@@ -1,20 +1,22 @@
1
-import Component from 'sparkles-component';
+import Component from '@glimmer/component';
2
3
-export default class EsButton extends Component {
+export default class EsButtonComponent extends Component {
4
+ // default value
5
+ _onClicked = () => {};
6
- constructor({ onClicked }) {
7
+ constructor() {
8
super(...arguments);
9
- if(!onClicked) {
10
+
11
+ if(!this.args.onClicked) {
12
// eslint-disable-next-line no-console
13
console.warn(new Error('Button created with no onClicked'));
- this.onClicked = function() {};
14
} else {
- this.onClicked = onClicked;
15
+ this._onClicked = this.args.onClicked;
16
}
17
18
19
buttonClicked() {
- this.onClicked();
20
+ this._onClicked();
21
22
0 commit comments