|
1 |
| -<div [ngClass]="element === 'white-list' || element === 'black-list' ? 'float-right' : ''"> |
2 |
| - <ng-container [ngSwitch]="element"> |
3 |
| - <ng-template ngSwitchCase="header"> |
4 |
| - <a tabindex="0" class="w-full cursor-pointer"> |
5 |
| - <div data-intercom-target="User Avatar Button" (isMenuOpen)="toggleVisible($event, dropdownMenu)" appDropdown> |
6 |
| - <img style="width:32px;height:32px;" [src]="avatarUri"> |
7 |
| - </div> |
8 |
| - </a> |
9 |
| - </ng-template> |
10 |
| - <ng-template ngSwitchCase="black-list"> |
11 |
| - <svg (isMenuOpen)="toggleVisible($event, dropdownMenu)" appDropdown |
12 |
| - xmlns="http://www.w3.org/2000/svg" |
13 |
| - class="h-5 w-5 float-right cursor-pointer text-gray-500" viewBox="0 0 20 20" |
14 |
| - fill="currentColor"> |
15 |
| - <path |
16 |
| - d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" /> |
17 |
| - </svg> |
18 |
| - </ng-template> |
19 |
| - <ng-template ngSwitchCase="white-list"> |
20 |
| - <svg (isMenuOpen)="toggleVisible($event, dropdownMenu)" appDropdown |
21 |
| - xmlns="http://www.w3.org/2000/svg" |
22 |
| - class="h-5 w-5 float-right cursor-pointer text-gray-500" viewBox="0 0 20 20" |
23 |
| - fill="currentColor"> |
24 |
| - <path |
25 |
| - d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" /> |
| 1 | +<ng-container [ngSwitch]="element"> |
| 2 | + <ng-template ngSwitchCase="header"> |
| 3 | + <a tabindex="0" class="w-full cursor-pointer"> |
| 4 | + <div data-intercom-target="User Avatar Button" (isMenuOpen)="toggleVisible($event, dropdownMenu)" appDropdown> |
| 5 | + <img class="h-8 w-8" [src]="avatarUri"> |
| 6 | + </div> |
| 7 | + </a> |
| 8 | + </ng-template> |
| 9 | + <ng-template ngSwitchCase="black-list"> |
| 10 | + <svg (isMenuOpen)="toggleVisible($event, dropdownMenu)" appDropdown |
| 11 | + xmlns="http://www.w3.org/2000/svg" |
| 12 | + class="h-5 w-5 float-right cursor-pointer text-gray-500" viewBox="0 0 20 20" |
| 13 | + fill="currentColor"> |
| 14 | + <path |
| 15 | + d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" /> |
| 16 | + </svg> |
| 17 | + </ng-template> |
| 18 | + <ng-template ngSwitchCase="white-list"> |
| 19 | + <svg (isMenuOpen)="toggleVisible($event, dropdownMenu)" appDropdown |
| 20 | + xmlns="http://www.w3.org/2000/svg" |
| 21 | + class="h-5 w-5 float-right cursor-pointer text-gray-500" viewBox="0 0 20 20" |
| 22 | + fill="currentColor"> |
| 23 | + <path |
| 24 | + d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" /> |
| 25 | + </svg> |
| 26 | + </ng-template> |
| 27 | + <ng-template ngSwitchDefault> |
| 28 | + <button type="button" [attr.data-tip]="buttonTooltip" [ngClass]="isButtonWhite ? 'text-gray-700 bg-white border-gray-300 py-1.5 tooltip tooltip-bottom' : 'bg-blue-700 text-white py-2'" |
| 29 | + class="inline-flex items-center justify-center rounded-md border shadow-sm px-4 text-xs font-semibold cursor-pointer focus:ring-offset-2 focus:ring-offset-gray-400" |
| 30 | + id="menu-button" aria-expanded="true" aria-haspopup="true" |
| 31 | + (isMenuOpen)="toggleVisible($event, dropdownMenu)" appDropdown> |
| 32 | + {{buttonName}} |
| 33 | + <svg class="-mr-1 ml-2 h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" |
| 34 | + fill="currentColor" aria-hidden="true"> |
| 35 | + <path fill-rule="evenodd" |
| 36 | + d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" |
| 37 | + clip-rule="evenodd" /> |
26 | 38 | </svg>
|
27 |
| - </ng-template> |
28 |
| - <ng-template ngSwitchDefault> |
29 |
| - <button type="button" [attr.data-tip]="buttonTooltip" [ngClass]="isButtonWhite ? 'text-gray-700 bg-white border-gray-300 py-1.5 tooltip tooltip-bottom' : 'bg-blue-700 text-white py-2'" |
30 |
| - class="inline-flex items-center justify-center rounded-md border shadow-sm px-4 text-xs font-semibold cursor-pointer focus:ring-offset-2 focus:ring-offset-gray-400" |
31 |
| - id="menu-button" aria-expanded="true" aria-haspopup="true" |
32 |
| - (isMenuOpen)="toggleVisible($event, dropdownMenu)" appDropdown> |
33 |
| - {{buttonName}} |
34 |
| - <svg class="-mr-1 ml-2 h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" |
35 |
| - fill="currentColor" aria-hidden="true"> |
36 |
| - <path fill-rule="evenodd" |
37 |
| - d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" |
38 |
| - clip-rule="evenodd" /> |
39 |
| - </svg> |
40 |
| - </button> |
41 |
| - </ng-template> |
42 |
| - </ng-container> |
43 |
| -</div> |
| 39 | + </button> |
| 40 | + </ng-template> |
| 41 | +</ng-container> |
| 42 | + |
44 | 43 |
|
45 | 44 | <div #dropdownMenu
|
46 | 45 | class="origin-top-right absolute mt-2 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none hidden"
|
|
0 commit comments