1.2.7 • Published 2 years ago
cathere-toast v1.2.7
Toast Library
Support version for React 17 ❤️
Instalation
$ npm install --save cathere-toast
$ yarn add cathere-toast
Features
- You can create toast with default params
- Yo can create toast with params
- backgroundColor
- img
- info ( default )
- success
- warning
- error
- msg
- time
- margin
- animation
- zoom ( default )
- reversal
- color
- position
- top-right (default)
- top-center
- top-left
- bottom-right
- bottom-center
- bottom-left
The gist
import React from 'react';
import { useRef } from "react";
import { ToastPortal } from "cathere-toast";
function App(){
const toastRef = useRef();
const showInfo = () => {
toastRef.current.add()
}
const showSuccess = () => {
toastRef.current.add({
backgroundColor:'#99FFCC',
img:'success',
msg: "Success toast example",
time: 5000,
margin: '10px',
animation: 'zoom',
color:'white' })
}
return (
<div>
<button onClick={showInfo}>Info</button>
<button onClick={showSuccess}>Succes</button>
<ToastPortal ref={toastRef} position='top-right' />
</div>
);
}
1.2.7
2 years ago
1.2.6
2 years ago
1.2.5
2 years ago
1.2.4
2 years ago
1.2.3
2 years ago
1.2.2
2 years ago
1.2.1
2 years ago
1.2.0
2 years ago
1.1.20
2 years ago
1.1.19
2 years ago
1.1.18
2 years ago
1.1.17
2 years ago
1.1.16
2 years ago
1.1.15
2 years ago
1.1.14
2 years ago
1.1.13
2 years ago
1.1.12
2 years ago
1.1.11
2 years ago
1.1.10
2 years ago
1.1.9
2 years ago
1.1.8
2 years ago
1.1.7
2 years ago
1.1.6
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.1.3
2 years ago
1.1.2
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.10
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago