xeodou / react-crouton

A message component for reactjs

Home Page:https://xeodou.github.io/react-crouton/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

prop autoMiss not working

davidsonsns opened this issue · comments

Hy, to prop autoMiss when it has the value true and also some button in the component does not work, is this behavior any better?
I will do it in my repository and make a new pull request, if it is valid.
thank you again

Hey @davidsonsns
I don;t thinks it's a good strategy automiss the component when you want interact with your users.
But i have a solution for you, you can render some buttons as child component like :

<Crouton autoMiss={true}>
<Button>Button1</Button>
<Button onclick={this.hide}>Hide</Button>
</Crouton>

Is that good for you ?

I opened this issue thinking that when there is a prop with this specific functionality it should overlap with any other type of prop
Otherwise you would not have the need to have the prop autoMiss, just check if there are buttons, agree?

@davidsonsns I totally agree with your thoughts, will push changes after. Thanks for your comments.