JSPM

ember-notifier

0.1.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q55431F
  • License MIT

Easy, beautiful notifications for your Ember project.

Package Exports

  • ember-notifier

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ember-notifier) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ember-notifier

Latest NPM release License TravisCI Build Status Ember Observer Score Code Climate Dependencies Dev Dependencies

Easy, beautiful notifications for your Ember project.

Installation

ember install ember-notifier

Usage

Add the ember-notifier component to your application template. This container displays notifications.

{{ember-notifier position="is-top-right"}}
{{outlet}}

Inject the notifier service anywhere you want to launch a notification.

import Component from '@ember/component';
import { inject as service } from '@ember/service';

export default Component.extend({
  notifier: service(),
});

Notifications can be added by calling styled functions.

this.get('notifier').primary('Primary notification');
this.get('notifier').info('Information notification');
this.get('notifier').success('Success notification');
this.get('notifier').warning('Warning notification');
this.get('notifier').danger('Danger notification');
this.get('notifier').secondary('Secondary notification');

Custom notifications can be called using add().

this.get('notifier').add('Custom notification', { type: 'custom-class' });

All notifications can be cleared using empty().

this.get('notifier').empty();

Check out the documentation for more customization and options.

Contributing

Installation

  • git clone https://github.com/scottwernervt/ember-notifier
  • cd ember-notifier
  • npm install

Linting

  • npm run lint:hbs
  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • ember try:each – Runs the test suite against multiple Ember versions

Running the dummy application

For more information on using ember-cli, visit https://ember-cli.com/.

Favicon

Created at favicon.io.

License

This project is licensed under the MIT License.