academia-de-codigo / react-semantic-toasts

React Semantic UI notifications library
MIT License
87 stars 31 forks source link

Corrected default types and added auto 'cursor: pointer;' #42

Closed jankaifer closed 5 years ago

jankaifer commented 5 years ago

I removed the default value of onClick - because Message from semantic-ui-react accepts onClick === undefined.

Added default value for style={{cursor: 'pointer'}} which can be overiden by providing your own style prop.

I've seen multiple projects where they have unclickable toasts just because they were too lazy to add style={{cursor: 'pointer'}}.

ferrao commented 5 years ago

@JanKaifer I am ok with passing down the style prop, but not with that logic of checking for the onClick and deciding on the cursor type.

The Message component does dot explicitly handle the onClick prop, it just passes down to the used element whatever props it did not handle. Perhaps we should do the same, instead of trying to handle every prop for every different use case.