import React , { ReactNode } from 'react' ; import { EuiLink } from '@elastic/eui' ; import { FormattedMessage } from '@kbn/i18n-react' ; interface Props { docPath : string ; text ? : ReactNode ; } export const LearnMoreLink = ( { docPath , text } ) => { const content = text ? ( text ) : ( < FormattedMessage id = "xpack.indexLifecycleMgmt.learnMore" defaultMessage = "Learn more" / > ) ; return ( < EuiLink href = { docPath } target = "_blank" external = { true } > { content } < /EuiLink>); } ;