noti-react

0.1.0 • Public • Published

Noti-react

npm version dependencies npm npm bundle size (minified)

Simple notification component for React with support for Typescript!

demo

Install

  1. Use npm
npm install noti-react
  1. Use yarn
yarn add noti-react

Notification

property propType required default description
type string ('error', 'info', 'success', 'warn') - 'info' Deside which type of notification do you want to use!
label string yes - Text which you want to display
autoHide bool - true Auto hide notification
animationTime number - 500 Time of animation duration in miliseconds
position string ('top-left', 'top-right', 'bottom-left', 'bottom-right') - 'bottom-right' Position in which corner do you want to display notification
hideTime number - 5000 After this time notification will close if autoHide props is true
customColor string (rgb string like '#000000') - - Add your custom color
className string - - Customize style by adding custom class

Example

  1. Import notification component
import { Notification } from 'noti-react';
  1. Use it in your component
<Notification
    label="Example of notification"
/>

Tests

Run tests

npm test

Package Sidebar

Install

npm i noti-react

Weekly Downloads

10

Version

0.1.0

License

MIT

Unpacked Size

18.1 kB

Total Files

8

Last publish

Collaborators

  • odudek