0.1.0 • Published 7 years ago

box4b-react-growl v0.1.0

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

Grow Like Notifications for box4b React Apps

Install

Step 1

Import the Redux Reducer and import it into you application

import {Reducer as notificationReducer} from "box4b-react-growl";

export default combineReducers({
  ...
  notificationReducer,
  ...
});

Step 2

Import the UI component and render it in your application (make sure it's always visible, like in a NavBar, or a Container)

import {Notification} from "box4b-react-growl";

export default MyContainer extends React.component {

  render() {
    return (
      <div className="container">
        {this.props.children}
        <Notification/>
      </div>
    )
  }
}

Usage

Use Redux Dispatch to send notification action :

import {notify, DANGER} from "box4b_react_growl";

const mapDispatchToProps = (dispatch, ownProps) => {
  return {
    notification: (message) => {
      return dispatch(notify(DANGER, message))
    }
  }
}

Todo

  • Init Custom Options (like labels, TIMEOUT value ..)
  • Webpacking ?
0.1.0

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago