Skip to content

Commit 34e8bb1

Browse files
committed
chore(wizard): use switch statement for header actions demo
1 parent a7a6756 commit 34e8bb1

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

projects/demo/src/app/wizard/wizard-header-actions.demo.ts

+10-6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@ export class WizardHeaderActionsDemo {
1818
userActive = true;
1919

2020
headerActionClicked(actionId: string) {
21-
if ('search' === actionId) {
22-
window.open('https://www.google.com?q=what+is+the+meaning+of+life', '_blank');
23-
} else if ('info' === actionId) {
24-
window.open('https://clarity.design', '_blank');
25-
} else {
26-
this.userActive = !this.userActive;
21+
switch (actionId) {
22+
case 'search':
23+
window.open('https://www.google.com?q=what+is+the+meaning+of+life', '_blank');
24+
break;
25+
case 'info':
26+
window.open('https://clarity.design', '_blank');
27+
break;
28+
case 'user':
29+
this.userActive = !this.userActive;
30+
break;
2731
}
2832
}
2933
}

0 commit comments

Comments
 (0)