File Manager / wp-content Search Upload New Item Settings File "db5.php" Full path: /home1/epichome/public_html/wp-content/db5.php File size: 60.67 B (60.67 KB bytes) MIME-type: text/x-php Charset: utf-8 Download Open Edit Advanced Editor Back
/home/pharmacy/public_html/wp-content/plugins/ninja-forms/src/components/DisplayNotice.js
import { Notice } from '@wordpress/components';
import PropTypes from 'prop-types';

export const DisplayNotice = ( props ) => {
	//TODO: Use state management
	const removeNotice = () => {
		jQuery( '#nf-trigger-emails-container .components-notice' ).remove();
		jQuery( '#nf-bulk-export-container .components-notice' ).remove();
	};

	return (
		<>
			<Notice
				status={ props.status }
				isDismissible="true"
				children={ props.text }
				politeness="polite"
				onRemove={ removeNotice }
			/>
		</>
	);
};

DisplayNotice.propTypes = {
	isDismissible: PropTypes.string,
	status: PropTypes.string,
	text: PropTypes.string
}