collapseToast
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
node | HTMLElement | β | - | The html node that reference the toast. Accessible via nodeRef.current |
done | () => void | β | - | Need to be called to remove the toast. |
duration | number | [number,number] | β | 300 | The duration of the collapse transition |
import { collapseToast } from 'react-toastify';
collapse(node, done);
Tips
This function is useful when you build your own transition with the Transition
component from react-transition-group.