ErrorInstalling.js (851B)
1 import { __ } from '@wordpress/i18n' 2 import { 3 Modal, Button, Notice, 4 } from '@wordpress/components' 5 import { render } from '@wordpress/element' 6 import RequiredPluginsModal from './RequiredPluginsModal' 7 8 export default function ErrorInstalling({ msg }) { 9 const goBack = () => render(<RequiredPluginsModal/>, document.getElementById('extendify-root')) 10 11 return <Modal 12 style={{ 13 maxWidth: '500px', 14 }} 15 title={__('Error installing plugins', 'extendify-sdk')} 16 isDismissible={false} 17 > 18 {__('You have encountered an error that we cannot recover from. Please try again.', 'extendify-sdk')} 19 <br /> 20 <Notice isDismissible={false} status="error">{msg}</Notice> 21 <Button isPrimary onClick={goBack}> 22 {__('Go back', 'extendify-sdk')} 23 </Button> 24 </Modal> 25 }