Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hiddenActions Functionality to the Dialog Component #16

Closed
lucasferreiralimax opened this issue Oct 17, 2024 · 0 comments · Fixed by #17
Closed

Add hiddenActions Functionality to the Dialog Component #16

lucasferreiralimax opened this issue Oct 17, 2024 · 0 comments · Fixed by #17
Assignees
Labels
enhancement New feature or request hacktoberfest

Comments

@lucasferreiralimax
Copy link
Member

Add a new input property hiddenActions to the dialog component. This property should allow hiding the actions (confirm and cancel buttons) when set to true.

Implementation Details:

  1. Add the Input:

    • Introduce the hiddenActions property in the component:
      @Input() hiddenActions: boolean = false;
  2. Modify the Template:

    • Update the component's template to include the logic for displaying the actions. The actions should be hidden if hiddenActions is set to true.
    • Example:
      @if(!hiddenActions) {
        <div class="up-window-footer" [ngClass]="'align-' + buttonAlignment">
          <button
            class="btn btn-cancel"
            [ngClass]="getButtonClass(cancelType)"
            (click)="onCancel()"
            [attr.aria-label]="cancelText"
          >
            {{ cancelText }}
          </button>
          <button
            class="btn btn-confirm"
            [ngClass]="getButtonClass(confirmType)"
            (click)="onConfirm()"
            [attr.aria-label]="confirmText"
          >
            {{ confirmText }}
          </button>
        </div>
      }

Notes:

  • This functionality will be particularly useful in scenarios where the user does not wish to display default actions (e.g., in an information modal).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant