Skip to content
Snippets Groups Projects
Commit 5ee1f8f8 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Export the function itself

parent c7b7b21d
No related branches found
No related tags found
No related merge requests found
import './vpu-notification';
import send from './notification';
import { send } from './notification';
export { send };
module.exports = {
/**
* Sends a notification via the event
*
......@@ -14,7 +12,7 @@ module.exports = {
*
* @param options
*/
send: (options) => {
function send(options) {
const event = new CustomEvent("vpu-notification-send", {
bubbles: true,
cancelable: true,
......@@ -22,5 +20,6 @@ module.exports = {
});
window.dispatchEvent(event);
},
};
}
export { send };
import {i18n} from './i18n';
import notification from './notification';
import {send as notify} from './notification';
import {html, LitElement} from 'lit-element';
import './vpu-notification';
......@@ -49,7 +49,7 @@ class NotificationDemo extends LitElement {
send() {
const types = ["primary", "link", "info", "success", "danger", "warning"];
notification.send({
notify({
"summary": "Item deleted",
"body": `Item ${Math.random().toString(36).substring(7)} foo was deleted!`,
"type": types[Math.floor(Math.random() * types.length)],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment