react-vui-alerts
React component for displaying alerts.
Installation
Install from NPM:
npm install react-vui-alerts
Install from Bower:
bower install react-vui-alerts
Usage
Import the style:
@import "bower_components/react-vui-alerts/alerts"; // or...
@import "node_modules/react-vui-alerts/alerts";
Require the component:
var Alerts = require('react-vui-alerts');
And then use the component as a container for your error message:
var AppComponent = React.createClass({
...
render: function() {
if (this.state.isError) {
return <Alerts.Error> some error content/view </Alerts.Error>;
} else {
return <SomeOtherView />;
}
},
...
});
Contributing
Code Style
This repository is configured with EditorConfig rules and contributions should make use of them. See the VUI Best Practices & Style Guide for more information.