VlocityDCModal

VlocityDCModal

vlocity-dc-modal is a web component to show modal popup.

Constructor

new VlocityDCModal()

Properties:
Name Type Description
header String text of modal header.
description Array.<String> array of strings to display on modal body.
btnText String text to be displayed for button in UI.
cbEvent String event to be triggered on button click callback.
Example
Sample Usage -

Include the component in your template simply by adding <vlocity-dc-modal> custom tag

<vlocity-dc-modal header="your header" description="your description" btnText="ok" cbEvent="my-callback-event"></vlocity-dc-modal>


 KEY INFO -

 events fired : {cbEvent}

 events registered : none

 Dependency - vlocity-dc-modal is an independent component and has no dependency on parent component.

              | Parent Component | Expected Child Component            |
              |------------------|-------------------------------------|
              | none             | none                                |

List of available slots -

| Slot names                        | Dynamic     | Description                           | Impact                  |
|-----------------------------------|-------------|---------------------------------------|-------------------------|
| dc-modal-wrapper                  | -           | Wrapper for component                 | Replaces template DOM   |
| dc-modal-header-content           | -           | Wrapper for header content            | Replaces header content |
| dc-modal-body-content             | -           | Wrapper for body content              | Replaces body content   |
| dc-modal-footer-content           | -           | Wrapper for footer content            | Adds footer             |

Extends

  • LitElement

Members

(static, readonly) properties

Properties that will be available in the binding system
Properties:
Name Type Description
header String text of modal header.
description Array.<String> array of strings to display on modal body.
btnText String text to be displayed for button in UI.
cbEvent String event to be triggered on button click callback.

Methods

(static) closeModal()

callback function for event {btnEvent} when user click on close button.

(static) connectedCallback()

Invoked when vlocity-dc-modal component is added to the document’s DOM.

(static) saveModal()

callback function for event {btnEvent} when user click on save/ok button.