Last active
December 2, 2016 13:30
-
-
Save andrey-skl/039e4bed721b158931e6e4edfd1280bf to your computer and use it in GitHub Desktop.
Alerts example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Alert from 'alert'; | |
<Alerts> | |
{myStore.alerts.map(alert => { | |
<Alert key={alert.key} onClose={() => ...remove alert from store}>{alert}</Alert> | |
})} | |
</Alerts> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {AlertsContainer} from 'alert'; | |
<AlertsContainer/> | |
... | |
import Alert from 'alert'; | |
Alert.showError(<Alert>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment