Skip to content

Customizable modal layouts #96

Description

@FrameMuse

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions