Closed faeztgh closed 3 years ago
There's an onClose prop
This is taken from the example on the home page for this library.
const AlertTemplate = ({ style, options, message, close }) => (
<div style={style}>
{options.type === 'info' && '!'}
{options.type === 'success' && ':)'}
{options.type === 'error' && ':('}
{message}
<button onClick={close}>X</button>
</div>
)
Still not clear how to close alert in custom templates!