reactjs-toastify
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "reactjs-toastify", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "React Toast is a library for showing notifications in your app", | ||
@@ -5,0 +5,0 @@ "author": "https://github.com/vkaswin/react-toast.git", |
@@ -1,4 +0,4 @@ | ||
# reactjs-toast | ||
# React Toast | ||
> React Toast is a library for showing notifications in your app | ||
> React Toast is a library for showing notifications in your app [DEMO](https://vkaswin.github.io/react-intro) | ||
@@ -10,3 +10,3 @@ [![NPM](https://img.shields.io/npm/v/reactjs-toast.svg)](https://www.npmjs.com/package/reactjs-toast) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) | ||
```bash | ||
npm install --save reactjs-toast | ||
npm install --save reactjs-toastify | ||
``` | ||
@@ -17,16 +17,38 @@ | ||
```jsx | ||
import React, { Component } from 'react' | ||
import { Fragment } from "react"; | ||
import { ToastContainer, Toast } from "reactjs-toastify"; | ||
import MyComponent from 'reactjs-toast' | ||
import 'reactjs-toast/dist/index.css' | ||
import "reactjs-toast/dist/index.css"; | ||
class Example extends Component { | ||
render() { | ||
return <MyComponent /> | ||
const Example = () => { | ||
const toggle = () => { | ||
Toast({ | ||
type= "success", | ||
message = "Lorem Ipsum is simply dummy text of the printing", | ||
}) | ||
} | ||
} | ||
return ( | ||
<Fragment> | ||
<button onClick={toggle}>Show Toast</button> | ||
<NotificationContainer /> | ||
</Fragment> | ||
); | ||
}; | ||
``` | ||
### Parameters | ||
| Name | Type | Description | | ||
| -------------- | ------- | :---------------------------------------------------------------: | | ||
| `mesage` | Boolean | Content to sjow in the toast | | ||
| `type` | String | Type of toast | | ||
| `delay` | Number | It will delay the toast apperaence | | ||
| `position` | String | Position where will display the toast | | ||
| `pauseOnHover` | Boolean | Stops the timer when hover the toast or not | | ||
| `closeIcon` | Boolean | Whether to show the close icon or not | | ||
| `theme` | String | Determines the theme of the toast | | ||
| `color` | String | It will change the default color of the toast (string, rgba, hex) | | ||
## License | ||
MIT © [https://github.com/vkaswin/react-toast.git](https://github.com/https://github.com/vkaswin/react-toast.git) |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
293364
53
45