import { EuiEmptyPrompt , EuiPageContent } from '@elastic/eui' ; import React from 'react' ; interface Props { title : React . ReactNode ; error : Error | null ; actions ? : JSX . Element ; } export const SectionError = ( { title , error , actions , ... rest } ) => { const errorMessage = error ?. message ?? JSON . stringify ( error , null , 2 ) ; return ( < EuiPageContent verticalPosition = "center" horizontalPosition = "center" color = "danger" > < EuiEmptyPrompt iconType = "alert" title = { < h2 > { title } < /h2>} body={<p> < pre > { errorMessage } < /pre> { actions ? actions : null } < /p>}/ > < /EuiPageContent>); } ;