Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Dialog

Info

Props:

  • children - used to display whatever include between the body of the dialog, passed as component's child - between opening and closing tags

  • isSubmitInProgress - Boolean, if true submit and cancel button is disabled and spinner is displayed

  • formId - String, connected with submit button, formId should used for submitting form, formId should be the same with form idas id property passed to form component, e.qg.
    <form onSubmit={handleSubmit(someFunc)}  <form id='some-id'>

  • isOpen - Boolean, if true - dialog is shown, if false - dialog is hidden

  • onClose- void, function called to close a dialog

  • submitButton - Boolean, if true - submit button is shown

  • cancelButton - Boolean, if true - cancel button is shown

  • closeButton - Boolean, if true - close button is shown

  • dialogType - DialogType.FORM | DialogType.DETAILS - decide on dialog css style, possible to add more variableString (DialogType enum may be used), used to style dialog differently for each type

Default (dialogType = DialogType.DETAILS):

...