1.2.7 • Published 3 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
3 years ago
1.2.6
3 years ago
1.2.5
3 years ago
1.2.4
3 years ago
1.2.3
3 years ago
1.2.2
3 years ago
1.2.1
3 years ago
1.2.0
3 years ago
1.1.20
3 years ago
1.1.19
3 years ago
1.1.18
3 years ago
1.1.17
3 years ago
1.1.16
3 years ago
1.1.15
3 years ago
1.1.14
3 years ago
1.1.13
3 years ago
1.1.12
3 years ago
1.1.11
3 years ago
1.1.10
3 years ago
1.1.9
3 years ago
1.1.8
3 years ago
1.1.7
3 years ago
1.1.6
3 years ago
1.1.5
3 years ago
1.1.4
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.0.10
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago