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

Warning: Failed prop type: Invalid prop `timeout` supplied to `SAlertContent`. #38

Closed azolson closed 7 years ago

azolson commented 7 years ago

firstly, thank you for this component :)

I'm getting an error when I try to fire an alert. I am invoking the following:

Alert.success('
    <p>Success</p><p>Classification updated</p>' , {
        position: 'top-right',
        effect: 'jelly',
        beep: false,
        timeout: '4000',
        html: true
        }
)

and the component is being rendered as follows: <Alert stack={{limit: 3}} />

The alert is firing successfully, however it's having a problem with the props.

I'm using the following versions: react-s-alert@1.3.0 prop-types@15.5.8 react@15.4.2

Any ideas on what I'm doing wrong?

juliancwirko commented 7 years ago

Hi, you need to pass number in timeout the only accepted string is none

azolson commented 7 years ago

thanks for the quick response - closing issue 👍