Skip to content

lxzxl/react-bulma-notification

Repository files navigation

react-bulma-notification

NPM Version Coverage Status Build Status Downloads Dependency Status License

A simple notification component for react and bulma css framework.

Install

npm i -S react-bulma-notification

Usage

import React, { Component, PureComponent } from 'react';
import ReactDOM from 'react-dom';
import 'bulma/css/bulma.css';
import Notification from 'react-bulma-notification';
import 'react-bulma-notification/css/index.css';

class App extends Component {
  render() {
    return (
      <div className="container">
        <a className="button is-danger" onClick={() => this.onClick('error')}>
          Error
        </a>button
      </div>
    );

    onClick = () => {
      Notification.error('This is an error!');
    };
  }
}

Documentation

http://lxzxl.github.io/react-bulma-notification