npm install @accordproject/cicero-uiimport { ErrorLogger } from '@accordproject/cicero-ui';
const navigateToClauseError = // Insert your navigation function here.
const errorsPropsObject = {
ERRORS_HEADER_BACKGROUND (string),
ERRORS_HEADER_BACKGROUND_HOVER (string),
ERRORS_HEADER_EXPAND_ARROW (string),
ERRORS_HEADER_BORDER_TOP (string),
ERRORS_HEADER_SHADOW (string),
ERRORS_DISPLAY_BACKGROUND (string),
ERRORS_DISPLAY_SHADOW (string),
ERRORS_DISPLAY_Z_INDEX (string),
ERROR_BORDER_BOTTOM (string),
ERROR_EXPAND_ARROW (string),
ERROR_FILE (string),
ERROR_FILE_HOVER (string),
ERROR_TYPE (string),
ERROR_FULL_MESSAGE (string),
ERROR_SHORT_MESSAGE (string),
};
const ErrorContainer = props => (
<ErrorLogger errors={props.errors} errorsProps={errorsPropsObject} errorNav={navigateToClauseError}/>
);errors: Anobjectwith unique key and error's data.
errorsProps: An optionalobject, see below.errorNav: An optionalfunctionwhich will navigate to the corresponding error.
This component is built to have the following dimensions:
width: '100%';You can style the error component, as well as the individual errors. An object may be passed down this component with the following possible CSS inputs as strings:
ERRORS_HEADER_BACKGROUNDERRORS_HEADER_BACKGROUND_HOVERERRORS_HEADER_EXPAND_ARROWERRORS_HEADER_BORDER_TOPERRORS_HEADER_SHADOWERRORS_DISPLAY_BACKGROUNDERRORS_DISPLAY_SHADOWERRORS_DISPLAY_Z_INDEXERROR_BORDER_BOTTOMERROR_EXPAND_ARROWERROR_FILEERROR_FILE_HOVERERROR_TYPEERROR_FULL_MESSAGEERROR_SHORT_MESSAGE