rjsnotify
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

rjsnotify 🎉

A simple react notification component. ✨

Install

$ npm install rjsnotify

Usage

import Notification, { notify } from 'rjsnotify';

const App = () => {
	const showNotification = () => {
		notify({ message: 'Hello world', placement: 'TOP_RIGHT', type: 'info' });
	};

	return (
		<div>
			<Notification />
			<button onClick={showNotification}>notiy</button>
		</div>
	);
};

API

notify props

Name Type Default Required
message string true
placements string "TOP_LEFT" false
duration number 1500 false
type string false

placements

  • TOP_LEFT
  • TOP_RIGHT
  • BOTTOM_LEFT
  • BOTTOM_RIGHT

types

  • danger
  • success
  • info
  • warning

Pending features 🚧

  • CSS transitions
  • Rendering custom elements
  • Pause on hover

Contribute 🧑‍💻

Clone this repository make a pull request to develop branch

MIT ❤️

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i rjsnotify

      Weekly Downloads

      0

      Version

      1.0.2

      License

      MIT

      Unpacked Size

      42 kB

      Total Files

      4

      Last publish

      Collaborators

      • s-sukesh