Skip to content

Commit

Permalink
Merge branch 'main' into 849-collapse
Browse files Browse the repository at this point in the history
  • Loading branch information
iurynogueira authored Oct 3, 2023
2 parents 10dccf0 + 5547c67 commit ae31555
Showing 1 changed file with 21 additions and 23 deletions.
44 changes: 21 additions & 23 deletions projects/ion/src/lib/indicator/indicator.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h4 data-testid="ion-indicator-value">{{ value }}</h4>
*ngIf="buttonConfig && !loading && !error"
>
<ion-button
*ngIf="buttonConfig.type !== 'popover'; else ionPopoverButton"
*ngIf="buttonConfig.type !== 'popover'"
[attr.data-testid]="'ion-indicator-button-' + buttonConfig.type"
type="ghost"
size="sm"
Expand All @@ -72,28 +72,26 @@ <h4 data-testid="ion-indicator-value">{{ value }}</h4>
[iconType]="buttonConfig.icon ? buttonConfig.icon : 'right2'"
(ionOnClick)="handleButtonClick(buttonConfig.type)"
></ion-button>
<ng-template #ionPopoverButton>
<ion-button
[attr.data-testid]="'ion-indicator-button-' + buttonConfig.type"
type="ghost"
size="sm"
rightSideIcon="true"
[label]="buttonConfig.label"
[iconType]="buttonConfig.icon ? buttonConfig.icon : 'right2'"
(ionOnClick)="handleButtonClick(buttonConfig.type)"
ionPopover
[ionPopoverTitle]="buttonConfig.popoverConfig.ionPopoverTitle"
[ionPopoverBody]="ionIndicatorPopoverBody"
[ionPopoverActions]="buttonConfig.popoverConfig.ionPopoverActions"
[ionPopoverIcon]="buttonConfig.popoverConfig.ionPopoverIcon"
[ionPopoverIconClose]="
buttonConfig.popoverConfig.ionPopoverIconClose
"
[ionPopoverPosition]="buttonConfig.popoverConfig.ionPopoverPosition"
(ionOnFirstAction)="buttonConfig.popoverConfig.firstAction()"
(ionOnSecondAction)="buttonConfig.popoverConfig.secondAction()"
></ion-button>
</ng-template>

<ion-button
*ngIf="buttonConfig.popoverConfig"
[attr.data-testid]="'ion-indicator-button-' + buttonConfig.type"
type="ghost"
size="sm"
rightSideIcon="true"
[label]="buttonConfig.label"
[iconType]="buttonConfig.icon ? buttonConfig.icon : 'right2'"
(ionOnClick)="handleButtonClick(buttonConfig.type)"
ionPopover
[ionPopoverTitle]="buttonConfig.popoverConfig.ionPopoverTitle"
[ionPopoverBody]="ionIndicatorPopoverBody"
[ionPopoverActions]="buttonConfig.popoverConfig.ionPopoverActions"
[ionPopoverIcon]="buttonConfig.popoverConfig.ionPopoverIcon"
[ionPopoverIconClose]="buttonConfig.popoverConfig.ionPopoverIconClose"
[ionPopoverPosition]="buttonConfig.popoverConfig.ionPopoverPosition"
(ionOnFirstAction)="buttonConfig.popoverConfig.firstAction()"
(ionOnSecondAction)="buttonConfig.popoverConfig.secondAction()"
></ion-button>
</footer>
</div>
</div>
Expand Down

0 comments on commit ae31555

Please sign in to comment.