@brighthr/component-toast
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2
0
38
0
22122
- Removed@testing-library/user-event@^14.2.1
- Removed@babel/code-frame@7.24.7(transitive)
- Removed@babel/helper-validator-identifier@7.24.7(transitive)
- Removed@babel/highlight@7.24.7(transitive)
- Removed@babel/runtime@7.24.7(transitive)
- Removed@testing-library/dom@10.1.0(transitive)
- Removed@testing-library/user-event@14.5.2(transitive)
- Removed@types/aria-query@5.0.4(transitive)
- Removedansi-regex@5.0.1(transitive)
- Removedansi-styles@3.2.14.3.05.2.0(transitive)
- Removedaria-query@5.3.0(transitive)
- Removedchalk@2.4.24.1.2(transitive)
- Removedcolor-convert@1.9.32.0.1(transitive)
- Removedcolor-name@1.1.31.1.4(transitive)
- Removeddequal@2.0.3(transitive)
- Removeddom-accessibility-api@0.5.16(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedhas-flag@3.0.04.0.0(transitive)
- Removedlz-string@1.5.0(transitive)
- Removedpicocolors@1.0.1(transitive)
- Removedpretty-format@27.5.1(transitive)
- Removedreact-is@17.0.2(transitive)
- Removedregenerator-runtime@0.14.1(transitive)
- Removedsupports-color@5.5.07.2.0(transitive)