juliancwirko / react-s-alert

Alerts / Notifications for React with rich configuration options
https://www.npmjs.com/package/react-s-alert
MIT License
649 stars 75 forks source link

the cross of the alert does not work #18

Closed dhruv004 closed 7 years ago

dhruv004 commented 8 years ago

Hi,

I have a simple error alert i am not able to close the alert on click of the cross.Will I have to make a custom template to do this.I mean am i doing something wrong.

this is my jsx

import Alert from 'react-s-alert';

onClickHandler = () => {
           Alert.closeAll();
       Alert.error('Cannot Edit', {
        position: 'bottom-right',
        effect: 'slide',
        timeout: 3000
    });
}

render()=>{
<div>
  <a onClick={this.clickHandler}>Edit</a>
  <Alert stack={{limit: 3}} />
</div>
}

and i have added the css in my index.html,Also it does not close on the timeout as well

juliancwirko commented 8 years ago

Hi, from this code it is hard to say what could go wrong. There is a working demo app here: https://github.com/juliancwirko/react-s-alert-demo so you could compare the implementation with yours. You can also prepare a reproduction repo so I'll be able to debug this. Thanks.

SienaSantos commented 8 years ago

hello @dhruv004

import css for slide effect.

import 'react-s-alert/dist/s-alert-css-effects/slide.css';
juliancwirko commented 7 years ago

Hey, I'll close it for now, if someone have good reproduction repo let me know.