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

Implement Restricted Close Mode for UpWindowAngularComponent #5

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

Implement Restricted Close Mode for UpWindowAngularComponent #5

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

Comments

@lucasferreiralimax
Copy link
Member

We need to enhance the UpWindowAngularComponent to support a "restricted mode" where the modal can only be closed using the "Cancel" or "Confirm" buttons. In this mode, the close button (×) should be hidden, and clicking on the overlay should not close the modal.

Acceptance Criteria:

  1. Restrict Mode Input:

    • Add an input property restrictMode: boolean to the UpWindowAngularComponent.
    • When restrictMode is set to true, the following changes should apply:
      • The close button (×) should not be displayed in the modal header.
      • Clicking on the overlay should not close the modal.
  2. Behavior:

    • If restrictMode is false:
      • The close button should be visible, and clicking it should close the modal.
      • Clicking on the overlay should close the modal as usual.
    • If restrictMode is true:
      • The modal should only be closed by clicking the "Cancel" or "Confirm" buttons.

Implementation Notes:

  • Update the component template to conditionally render the close button based on the value of restrictMode.
  • Modify the click event on the overlay to check the value of restrictMode.

Example Usage:

<up-window-angular
  [isOpen]="isModalOpen"
  [restrictMode]="true"  <!-- Activates restricted mode -->
  title="Modal Title"
  subtitle="Modal Subtitle"
  (confirm)="onConfirm()"
  (cancel)="onCancel()"
>
  Modal Content
</up-window-angular>
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