Modals

All modals are created with one function.


<Button
 on:click={() => {createElementModal('modalAlert', 
 {modalWidth: '500px', body: 'test body', header: 'test header'})}} 

 //first param 'modalAlert' is component name. Different components has different params.

>Open Modal</Button>

...

createElementModal('modalPopupClose', {
      modalWidth: '500px',
      body: 'There are unsaved changes, are you sure you want to leave?',
      header: 'You have unsaved changes!',
      okButton: 'Yes, discard my changes',
      closeButton: 'Stay'
});