Skip to content
Snippets Groups Projects
Christoph Reiter's avatar
Reiter, Christoph authored
Add a scope so we don't have to care about naming conflicts
and set the verison to 0.1.0 since we don't have a stable API yet.
1cea6eab
History

Notification Web Component

Usage

<dbp-notification></dbp-notification>

Attributes

  • lang (optional, default: de): set to de or en for German or English
    • example <dbp-notification lang="de" client-id="my-client-id"></dbp-notification>

Sending notifications

import { send } from './notification';

send({
    "summary": "Item deleted",
    "body": "Item foo was deleted!",
    "type": "info",
    "timeout": 5,
});

Local development

# get the source
git clone git@gitlab.tugraz.at:dbp/web-components/toolkit.git
cd toolkit/packages/notification

# install dependencies
yarn install

# constantly build dist/bundle.js and run a local web-server on port 8002 
yarn run watch

# run tests
yarn test

# build local packages in dist directory
yarn run build

Jump to http://localhost:8002 and you should get a demo page.