ErrorModal
Reference
- The
ErrorModalcomponent is designed to display error details in a modal dialog. - It provides a user-friendly way to show error information and allows users to dismiss the modal.
Props
state(required):- An object containing error details to be displayed.
- Passed to the
ErrorDetailscomponent for rendering the error content.
Usage Example
function Example(pageContext) {
const { protrakComponents } = React.useContext(customWidgetContext);
const { ErrorModal } = protrakComponents;
const errorState = { message: 'An unexpected error occurred.' };
return <ErrorModal state={errorState} />;
};
- This will render an error modal displaying the error details and an "OK" button to close the modal.