diff --git a/settings/src/components/global-notice.js b/settings/src/components/global-notice.js index 68171e46..6778eef8 100644 --- a/settings/src/components/global-notice.js +++ b/settings/src/components/global-notice.js @@ -4,14 +4,23 @@ import { Flex, Snackbar } from '@wordpress/components'; import { check } from '@wordpress/icons'; -export default function GlobalNotice( { notice } ) { +export default function GlobalNotice( { notice, setNotice } ) { if ( ! notice ) { return; } + const onRemove = () => { + setNotice( '' ); + } + return ( - + { notice } diff --git a/settings/src/script.js b/settings/src/script.js index 438c9d3c..7053c7a4 100644 --- a/settings/src/script.js +++ b/settings/src/script.js @@ -152,7 +152,7 @@ function Main( { userId } ) { return ( - + { screenContent } );