File "index.js"

Full Path: /home/siazco/grocery.siazco.se/wp-content/plugins/better-wp-security/core/packages/components/src/result-summary/index.js
File size: 631 bytes
MIME-type: text/x-java
Charset: utf-8

/**
 * Internal dependencies
 */
import { ErrorList, MessageList } from '../';

export default function ResultSummary( {
	result,
	hasBorder,
	schemaError,
	errors,
} ) {
	return (
		<>
			<ErrorList
				apiError={ result?.error }
				schemaError={ schemaError }
				errors={ errors }
				hasBorder={ hasBorder }
			/>
			<MessageList
				messages={ result?.success }
				type="success"
				hasBorder={ hasBorder }
			/>
			<MessageList
				messages={ result?.warning }
				type="warning"
				hasBorder={ hasBorder }
			/>
			<MessageList
				messages={ result?.info }
				type="info"
				hasBorder={ hasBorder }
			/>
		</>
	);
}