Skip to content

Commit

Permalink
chore(wizard): use switch statement for header actions demo
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbuhmann committed Feb 2, 2023
1 parent a7a6756 commit 34e8bb1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions projects/demo/src/app/wizard/wizard-header-actions.demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ export class WizardHeaderActionsDemo {
userActive = true;

headerActionClicked(actionId: string) {
if ('search' === actionId) {
window.open('https://www.google.com?q=what+is+the+meaning+of+life', '_blank');
} else if ('info' === actionId) {
window.open('https://clarity.design', '_blank');
} else {
this.userActive = !this.userActive;
switch (actionId) {
case 'search':
window.open('https://www.google.com?q=what+is+the+meaning+of+life', '_blank');
break;
case 'info':
window.open('https://clarity.design', '_blank');
break;
case 'user':
this.userActive = !this.userActive;
break;
}
}
}

0 comments on commit 34e8bb1

Please sign in to comment.