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

Customizable modal layouts #96

Open
FrameMuse opened this issue Apr 15, 2023 · 0 comments · May be fixed by #157
Open

Customizable modal layouts #96

FrameMuse opened this issue Apr 15, 2023 · 0 comments · May be fixed by #157
Assignees
Labels
enhancement New feature or request

Comments

@FrameMuse
Copy link
Owner

FrameMuse commented Apr 15, 2023

Add feature and example of creating ModalControllers with custom modal types.

Example 1

Description

  • Add a layout param to open method
  • Add a layouts param to ModalController constructor config
  • Add a "default layout" param to ModalController constructor config

Implementation

const MyModal = new ModalController({
  layouts: {
    dialog: DialogLayout
  },
  // Optional //
  default: {
    layout: "dialog"
  }
})

Result

These both should work in same way.

Modal.open(PopupComponent, { layout: "dialog" }) // Without default layout.
Modal.open(PopupComponent) // With default layout.
@FrameMuse FrameMuse self-assigned this Apr 15, 2023
@FrameMuse FrameMuse removed their assignment Apr 15, 2023
@FrameMuse FrameMuse self-assigned this Apr 24, 2023
@FrameMuse FrameMuse changed the title Customizable modal types Customizable modal layouts May 22, 2023
@FrameMuse FrameMuse added enhancement New feature or request and removed proposal labels May 22, 2023
@FrameMuse FrameMuse modified the milestones: v2.0.0, v2.1.0 May 22, 2023
@FrameMuse FrameMuse linked a pull request May 23, 2023 that will close this issue
@FrameMuse FrameMuse modified the milestones: v2.1.0, v2.2.0, v2.3.0 May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant