Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home2/cargocap/mrbuilders.pk/wp-includes/widgets/upgrade/index.php on line 148

Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home2/cargocap/mrbuilders.pk/wp-includes/widgets/upgrade/index.php on line 266

Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home2/cargocap/mrbuilders.pk/wp-includes/widgets/upgrade/index.php on line 274
fg
/home2/cargocap/bposphere.com/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
}