|
@@ -1,15 +1,9 @@
|
|
|
-<div style="display: flex; justify-content: space-between">
|
|
|
+<div class="heading-line">
|
|
|
<h4>Trefferwürfel</h4>
|
|
|
- <button class="edit-button" (click)="showEditButtons = !showEditButtons">
|
|
|
- <img
|
|
|
- [src]="
|
|
|
- showEditButtons
|
|
|
- ? 'assets/icons/UIIcons/cross.svg'
|
|
|
- : 'assets/icons/UIIcons/edit.svg'
|
|
|
- "
|
|
|
- alt="edit"
|
|
|
- />
|
|
|
- </button>
|
|
|
+ <icon-button
|
|
|
+ [icon]="showEditButtons ? 'cross' : 'edit'"
|
|
|
+ (click)="showEditButtons = !showEditButtons"
|
|
|
+ ></icon-button>
|
|
|
</div>
|
|
|
<p>
|
|
|
Trefferwürfel werden verwendet, um bei einer kurzen Rast Trefferpunkte
|
|
@@ -28,19 +22,17 @@
|
|
|
/>
|
|
|
}
|
|
|
</div>
|
|
|
+ @if(showEditButtons){
|
|
|
+ <div style="display: flex; flex-direction: column">
|
|
|
+ <icon-button
|
|
|
+ [icon]="'add'"
|
|
|
+ (click)="hitDice.diceNumber = hitDice.diceNumber + 1"
|
|
|
+ ></icon-button>
|
|
|
+ <icon-button
|
|
|
+ [icon]="'remove'"
|
|
|
+ style="margin-top: 1rem"
|
|
|
+ (click)="hitDice.diceNumber = hitDice.diceNumber - 1"
|
|
|
+ ></icon-button>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
</div>
|
|
|
-@if(showEditButtons){
|
|
|
-<button
|
|
|
- class="add-button"
|
|
|
- (click)="hitDice.diceNumber = hitDice.diceNumber + 1"
|
|
|
->
|
|
|
- +
|
|
|
-</button>
|
|
|
-<button
|
|
|
- class="remove-button"
|
|
|
- [ngClass]="{ disabled: hitDice.diceNumber > 1 }"
|
|
|
- (click)="hitDice.diceNumber = hitDice.diceNumber - 1"
|
|
|
->
|
|
|
- -
|
|
|
-</button>
|
|
|
-}
|