Properties

isActive: boolean

Is modal Active toggle

Methods

  • Handles the closing of the modal.

    Parameters

    • event: Event

      The event that triggered the modal closing.

    Returns void

  • Handles the opening of the modal.

    Parameters

    • event: Event

      The event that triggered the modal opening.

    Returns void

  • Updates the modal body content with new text.

    Parameters

    • copy: string | HTMLElement

      The new body content as a string.

    Returns void

  • Updates the modal footer buttons based on a configuration array.

    Parameters

    • config: ModalButtons[]

      An array of ModalButtons to configure the footer.

    Returns void

  • Updates the entire modal dialog with new content and buttons.

    Parameters

    • config: ModalContent

      A ModalConfig object containing the new dialog configuration.

    Returns void

  • Updates the modal header with new content.

    Parameters

    • copy: string | HTMLHeadingElement

      The new header content as a string.

    Returns void

  • Instantiates a new USAModal object. Must be initialized with an existing modal element.

    Parameters

    • modal: HTMLElement | HTMLButtonElement

      The HTMLElement to initialize.

    Returns USAModal

    A new instance of USAModal.

Generated using TypeDoc