Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

rt-notify

glebcha19MIT3.0.0TypeScript support: included

simple yet powerful notifications for React

react, notification, toast, rt-notify

readme

rt-notify

npm version

React notifications made simple, yet powerful

All dynamic styling propeties made with css variables and fallback to default properties.
const notification = { 
  type: 'waiting', 
  content: 'Waiting Notification New', 
  width: '700px', 
  onClose: () => console.log('CLOSED WAITING NOTIFICATION') 
}

type Animation = 'fade' | 'bounce' | 'zoom'
type Status = 'waiting' | 'success' | 'error'
type Placement = 'top' | 'bottom' | 'left' | 'right'

interface NotificationProps {
  id?: string | number
  type?: Status
  content: React.ReactNode
  width?: string
  timeout?: number | null
  onClose?: (event?: React.MouseEventHandler<HTMLElement>) => void
}

interface NotificationsProps {
  notifications: Array<NotificationProps>
  animation?: Animation
  placement?: Placement
  defaultTimeout?: number
  animationTimeout?: number
  duplicatePlaceholder?: React.ReactElement | null
}

changelog

rt-notify v3.0.0

simple yet powerful notifications for React

Bug Fixes

  • removed lint comments 08ae135a
  • stylelint 463966f7
  • upgrade react-transition-group from 4.4.1 to 4.4.2 0d1f443f
  • upgrade multiple dependencies with Snyk 966f1777

  • icon

    • replaced type from SFC with FC 1597d884
  • styles

    • changed effects naming to kebab-case a5b2ddb0
  • test

Features

  • used concurrently instead npm-run-all, updated dependencies 94424f03

  • notifications

    • added animationTimeout and changed animation name composition 2e37c053

Documentation

Refactor

Chore