Skip to content
This repository was archived by the owner on Mar 8, 2024. It is now read-only.

Commit 89fe4e3

Browse files
Removed unused code
1 parent ff23ade commit 89fe4e3

File tree

1 file changed

+41
-42
lines changed

1 file changed

+41
-42
lines changed

src/app/base/components/dropdown/dropdown.component.html

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,45 @@
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" />
2638
</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+
4443

4544
<div #dropdownMenu
4645
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

Comments
 (0)