How do I fire a snackbar notice in admin?
Question
I have a custom plugin and want it on occasions to fire the kind of notice that appears and disapears in the left corner like this one:
I found some code in the Gutenberg docs here:
const MySnackbarNotice = () => (
<Snackbar>
Post published successfully.
</Snackbar>
);
But adding this to my admin-enqueued js script obviously doesn’t work.
Thanks!
0
block-editor, javascript, notices
4 years
2020-03-24T08:52:06-05:00
2020-03-24T08:52:06-05:00 0 Answers
109 views
0
Leave an answer