Socket
Socket
Sign inDemoInstall

@brighthr/component-toast

Package Overview
Dependencies
4
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

4

dist/index.d.ts

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

import { ReactNode } from 'react';
import React, { ReactNode } from 'react';

@@ -19,4 +19,4 @@ declare type ToastParams = {

};
declare const Toaster: () => JSX.Element;
declare const Toaster: () => React.JSX.Element;
export { ToastParams, Toaster, useToast };
// src/index.tsx
import React, { useState, useEffect } from "react";
import React, { useEffect, useState } from "react";
import cn from "classnames";

@@ -4,0 +4,0 @@ var toasts = [];

{
"name": "@brighthr/component-toast",
"version": "2.0.0",
"license": "MIT",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"start": "tsup --watch",
"build": "tsup"
},
"eslintConfig": {
"rules": {
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/*.test.tsx"
]
}
]
}
},
"devDependencies": {
"@testing-library/react": "^12.0.0"
},
"peerDependencies": {
"react": ">=16.9.0"
},
"dependencies": {
"@testing-library/user-event": "^14.2.1",
"classnames": "^2.3.1"
},
"gitHead": "1b82cedd964ef0ee483494eba535cdd0e48716ea"
"name": "@brighthr/component-toast",
"version": "2.0.1",
"license": "MIT",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"start": "tsup --watch",
"build": "tsup"
},
"peerDependencies": {
"react": ">=16.9.0"
},
"dependencies": {
"classnames": "^2.3.1"
},
"gitHead": "bcc368c7b077e1087feecd6299cc53416f05ae25"
}

@@ -6,2 +6,3 @@ # ComponentName

To install, type the following into the command line at the root of your project:
```javascript

@@ -13,3 +14,4 @@ npm i @brighthr/component-toast

Where you add the `Toaster` component to the app will be the container that the toast messages will appear in. Recommended that this should be at the root of your app so they appear in the bottom left corner.
Where you add the `Toaster` component to the app will be the container that the toast messages will appear in.
Recommended that this should be at the root of your app so they appear in the bottom left corner.

@@ -20,10 +22,10 @@ ```javascript

<div>
<Toaster/>
</div>
<Toaster />
</div>;
```
## create a new toast
Import into your file:
```javascript

@@ -30,0 +32,0 @@ import { useToast } from '@brighthr/component-toast';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc