Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bufferapp/notifications

Package Overview
Dependencies
Maintainers
17
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bufferapp/notifications - npm Package Compare versions

Comparing version 1.9.3 to 1.9.4-beta-01

lib/components/Notifications/index.js

114

package.json
{
"name": "@bufferapp/notifications",
"version": "1.9.3",
"version": "1.9.4-beta-01",
"description": "Display application notifications",
"main": "index.js",
"main": "lib/index.js",
"scripts": {
"lint": "eslint . --ignore-pattern coverage node_modules"
"storybook": "start-storybook -p 9002",
"lint": "eslint --ext .js test/ src/",
"test": "npm run lint && jest",
"test-watch": "jest --watch",
"build": "babel src -d lib",
"prepublish": "babel src -d lib"
},
"author": "hharnisc@gmail.com",
"files": [
"lib",
"src"
],
"dependencies": {
"@bufferapp/keywrapper": "0.2.0"
"@bufferapp/keywrapper": "0.2.0",
"uuid": "3.3.2"
},
"devDependencies": {
"eslint": "3.19.0"
"@bufferapp/components": "3.0.2",
"@storybook/core": "^3.4.11",
"@storybook/react": "^3.4.11",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-export-extensions": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"deep-freeze": "0.0.1",
"eslint": "^5.3.0",
"eslint-plugin-prettier": "^3.0.0",
"eslint-plugin-react": "7.11.1",
"jest": "^23.5.0",
"prettier": "^1.14.2",
"react": "^16.5.2",
"react-dom": "^16.5.2",
"react-redux": "5.0.7",
"storybook-addon-a11y": "^3.1.9"
},
"peerDependencies": {
"@bufferapp/components": "3.x",
"react": "16.x",
"react-dom": "16.x",
"react-redux": "5.x"
},
"babel": {
"presets": [
[
"env",
{
"targets": {
"node": "8"
},
"browsers": "> 3%",
"modules": false
}
],
"react"
],
"plugins": [
"transform-class-properties",
"transform-export-extensions",
"transform-object-rest-spread"
],
"env": {
"test": {
"presets": [
[
"env",
{
"modules": "commonjs"
}
]
],
"plugins": [
"transform-class-properties",
"transform-export-extensions",
"transform-object-rest-spread"
]
}
}
},
"eslintConfig": {
"parser": "babel-eslint",
"env": {
"node": true,
"es6": true
},
"plugins": [
"prettier",
"react"
],
"rules": {
"prettier/prettier": [
2,
{
"singleQuote": true,
"trailingComma": "all",
"semi": false,
"bracketSpacing": true
}
],
"no-unused-vars": 2
}
},
"jest": {
"transformIgnorePatterns": [
"/node_modules(?!/@bufferapp/components)/"
],
"verbose": true
},
"publishConfig": {

@@ -17,0 +121,0 @@ "access": "public"

57

README.md

@@ -1,55 +0,2 @@

# @bufferapp/notifications
Create a notification that disappears after 5 seconds or when the user closes it.
## Setup
### Add Reducer And Middlware To Store
```js
import {
createStore,
combineReducers,
applyMiddleware,
} from 'redux';
import { middleware, reducer } from '@bufferapp/notifications';
const store = createStore(
combineReducers({
notifications: reducer, // add notifications reducer under the `notifications` state tree
}),
{/* initial state */},
applyMiddleware(middleware),
);
```
### Add Notifications Within The React Redux Provider
```js
import { Provider } from 'react-redux';
import Notifications from '@bufferapp/notifications';
<Provider store={store}>
<Notifications />
</Provider>
```
## API
### createNotification
**notificationType** _string_ the type of notification to display, `success` or `error` controls the icon
**message** _string_ the message to display on the notification
```js
import { actions } from '@bufferapp/notifications';
// dispatch the createNotification action with the redux store
store.dispatch(actions.createNotification({
notificationType: 'success',
message: 'Hooray! A notification appears!',
}));
```
# buffer-js-notifications
Notifications for React + Redux applications
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc