Skip to content

Commit c2dd09b

Browse files
committed
fix property for button
1 parent 3de544f commit c2dd09b

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

src/lib/components/button.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,18 @@ export class NgButton extends QPushButton implements NgComponent {
2424
namespace?: string | null
2525
): void {}
2626

27-
public setProperty(name: string, value: any): void {
28-
throw new Error('Method not implemented.');
27+
public setProperty(name: string, value: boolean | number): void {
28+
switch (name) {
29+
case 'enabled':
30+
this.setEnabled(value as boolean);
31+
break;
32+
case 'flat':
33+
this.setFlat(value as boolean);
34+
break;
35+
default:
36+
break;
37+
}
2938
}
30-
3139
public setStyle(
3240
style: string,
3341
value: any,

0 commit comments

Comments
 (0)