# @types/rr-notifications

> TypeScript definitions for rr-notifications

Latest version **1.1.6** (published 2023-12-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/rr-notifications
pnpm add @types/rr-notifications
yarn add @types/rr-notifications
bun add @types/rr-notifications
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.6 |
| Published | 2023-12-06 |
| First published | 2020-05-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51435 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/rr-notifications
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rr-notifications
- npm.io page: https://npm.io/package/@types/rr-notifications

## Dependencies (1)

- [@types/react](https://npm.io/package/@types/react.md) *

## Recent versions

- 1.1.6 (latest) — 2023-12-06
- 1.1.5 (ts4.5) — 2023-11-21
- 1.1.1 (ts3.6) — 2021-07-08
- 1.1.0 (ts2.9) — 2020-05-04
- 1.1.4 — 2023-11-07
- 1.1.3 — 2023-10-18
- 1.1.2 — 2023-09-27

## README

# Installation
> `npm install --save @types/rr-notifications`

# Summary
This package contains type definitions for rr-notifications (https://thegrinder.github.io/rr-notifications).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rr-notifications.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rr-notifications/index.d.ts)
````ts
import { JSX } from "react";

export interface NotificationsContextType {
    showNotification(payload?: NotificationPayload): void;
    removeNotification(id: string): () => void;
}

/**
 * The payload of each notification is described by this interface. Users of
 * this types package should use declaration merging to add their own standard
 * properties to this interface, since the library leaves it up to the user.
 */
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface NotificationPayload {}

export const NotificationsContext: React.Context<NotificationsContextType>;

export function useNotification(): NotificationsContextType;

export const NotificationsProvider: React.FC<{
    /** Render prop which passes down removeNotification function and notification payload */
    renderNotification(args: { removeNotification: () => void; payload: NotificationPayload }): JSX.Element;
    /** Fixed position where all notifications are displayed */
    position?: [string, string, string, string] | undefined;
    /** Duration of the show and hide animations in milliseconds */
    animationDuration?: number | undefined;
    /** Animation timing function / cubic-bezier */
    animationEasing?: string | undefined;
    /** Time in milliseconds after which the notification is automatically dismissed */
    dismissAfter?: number | undefined;
    /**
     * Horizontal direction which notification appears from. If not provided, the notification will
     * appear from top or bottom, depending on position prop
     */
    slideFromSide?: "right" | "left" | undefined;
}>;

````

### Additional Details
 * Last updated: Wed, 06 Dec 2023 06:08:17 GMT
 * Dependencies: [@types/react](https://npmjs.com/package/@types/react)

# Credits
These definitions were written by [Robbie Moore](https://github.com/RobbieGM).

---
_Source: https://npm.io/package/@types/rr-notifications · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
