Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions v2/ui/dialog/dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,7 @@ export class ZardDialogOptions<T, U> {
</main>

@if (!config.zHideFooter) {
<footer class="flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:gap-0 sm:space-x-2">
@if (config.zCancelText !== null) {
<button type="button" data-testid="z-cancel-button" z-button zType="outline" (click)="onCloseClick()">
@if (config.zCancelIcon) {
<ng-icon [svg]="config.zCancelIcon" class="size-4!" />
}

{{ config.zCancelText ?? 'Cancel' }}
</button>
}

<footer class="flex flex-col gap-2 sm:flex-row sm:justify-center sm:gap-3">
@if (config.zOkText !== null) {
<button
type="button"
Expand All @@ -143,6 +133,16 @@ export class ZardDialogOptions<T, U> {
{{ config.zOkText ?? 'OK' }}
</button>
}

@if (config.zCancelText !== null) {
<button type="button" data-testid="z-cancel-button" z-button zType="outline" (click)="onCloseClick()">
@if (config.zCancelIcon) {
<ng-icon [svg]="config.zCancelIcon" class="size-4!" />
}

{{ config.zCancelText ?? 'Cancel' }}
</button>
}
</footer>
}
`,
Expand Down