1.0.1 • Published 6 years ago
vue-wp-notice v1.0.1
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 dependencies
yarn install
# serve with hot reload at localhost:8080
yarn run dev
# build for production with minification
yarn run build
# build for production and view the bundle analyzer report
yarn run build --report