Vue WP Notice
A Vue.js component to display admin notices to users within WordPress. Unlike regular WordPress notices, a Vue WP Notice can be used anywhere within your page and it will not be moved underneath the page title.
Install
yarn add vue-wp-notice
Then into your app:
import Vue from 'vue'
import WPNotice from 'vue-wp-notice'
Vue.use(WPNotice)
Usage
<wp-notice type="success">Notice message goes here.</wp-notice>
Available parameters:
Parameter | Type | Options | Description |
---|---|---|---|
type | type | success, warning, info, error | Type of notice. |
dismissible | boolean | - | Wether the notice can be dismissed or not. |
alternative | boolean | - | Use alternative notice style or not. |
Build Setup
# install dependenciesyarn install# serve with hot reload at localhost:8080yarn run dev# build for production with minificationyarn run build# build for production and view the bundle analyzer reportyarn run build --report