react-alerts
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -77,4 +77,4 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var Alert = _react2.default.createClass({ | ||
displayName: 'Alert', | ||
var ReactAlert = _react2.default.createClass({ | ||
displayName: 'ReactAlert', | ||
@@ -124,5 +124,5 @@ propTypes: { | ||
className += ' alert alert-' + alertStyle; | ||
className += ' react-alert react-alert-' + alertStyle; | ||
if (dismissable) className += ' alert-dismissable'; | ||
if (dismissable) className += ' react-alert-dismissable'; | ||
@@ -142,5 +142,5 @@ return _react2.default.createElement( | ||
Alert.version = '0.0.1'; | ||
ReactAlert.version = '0.0.1'; | ||
exports.default = Alert; | ||
exports.default = ReactAlert; | ||
@@ -147,0 +147,0 @@ /***/ }, |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React")):"function"==typeof define&&define.amd?define(["React"],t):"object"==typeof exports?exports.ReactAlert=t(require("React")):e.ReactAlert=t(e.React)}(this,function(e){return function(e){function t(s){if(r[s])return r[s].exports;var a=r[s]={exports:{},id:s,loaded:!1};return e[s].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function s(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var r={};for(var s in e)t.indexOf(s)>=0||Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s]);return r}var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e};Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),l=s(o),i=l["default"].createClass({displayName:"Alert",propTypes:{alertStyle:l["default"].PropTypes.oneOf(["info","success","warning","danger"]),className:l["default"].PropTypes.string,dismissable:l["default"].PropTypes.bool,onDismiss:l["default"].PropTypes.func},getDefaultProps:function(){return{alertStyle:"info",className:"",dismissable:!0,onDismiss:function(){}}},render:function(){var e=this.props,t=e.className,r=e.alertStyle,s=e.children,o=e.dismissable,i=e.onDismiss,c=a(e,["className","alertStyle","children","dismissable","onDismiss"]);return t+=" alert alert-"+r,o&&(t+=" alert-dismissable"),l["default"].createElement("div",n({},c,{className:t}),o&&l["default"].createElement("button",{type:"button",className:"close",onClick:i},"×"),s)}});i.version="0.0.1",t["default"]=i},function(t,r){t.exports=e}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React")):"function"==typeof define&&define.amd?define(["React"],t):"object"==typeof exports?exports.ReactAlert=t(require("React")):e.ReactAlert=t(e.React)}(this,function(e){return function(e){function t(s){if(r[s])return r[s].exports;var a=r[s]={exports:{},id:s,loaded:!1};return e[s].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function s(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var r={};for(var s in e)t.indexOf(s)>=0||Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s]);return r}var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e};Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),l=s(o),i=l["default"].createClass({displayName:"ReactAlert",propTypes:{alertStyle:l["default"].PropTypes.oneOf(["info","success","warning","danger"]),className:l["default"].PropTypes.string,dismissable:l["default"].PropTypes.bool,onDismiss:l["default"].PropTypes.func},getDefaultProps:function(){return{alertStyle:"info",className:"",dismissable:!0,onDismiss:function(){}}},render:function(){var e=this.props,t=e.className,r=e.alertStyle,s=e.children,o=e.dismissable,i=e.onDismiss,c=a(e,["className","alertStyle","children","dismissable","onDismiss"]);return t+=" react-alert react-alert-"+r,o&&(t+=" react-alert-dismissable"),l["default"].createElement("div",n({},c,{className:t}),o&&l["default"].createElement("button",{type:"button",className:"close",onClick:i},"×"),s)}});i.version="0.0.1",t["default"]=i},function(t,r){t.exports=e}])}); |
{ | ||
"name": "react-alerts", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "A simple react component for displaying Alert banners.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -10,2 +10,19 @@ # react-alert | ||
and include the `react-alert.css` stylesheet. | ||
and include the `react-alert.css` stylesheet. | ||
## Usage | ||
CommonJS: | ||
``` | ||
var React = require('react'); | ||
var ReactAlert = require('react-alerts'); | ||
var ReactDOM = require('react-dom'); | ||
ReactDOM.render( | ||
React.createElement( | ||
ReactAlert, {alertStyle: 'success'}, | ||
'<strong>Well done!</strong> You've just displayed your first alert!'), | ||
document.body | ||
); | ||
``` |
@@ -7,3 +7,3 @@ import React from 'react'; | ||
const Alert = React.createClass({ | ||
const ReactAlert = React.createClass({ | ||
@@ -54,5 +54,5 @@ propTypes: { | ||
className += ' alert alert-' + alertStyle; | ||
className += ' react-alert react-alert-' + alertStyle; | ||
if (dismissable) className += ' alert-dismissable'; | ||
if (dismissable) className += ' react-alert-dismissable'; | ||
@@ -71,4 +71,4 @@ return ( | ||
Alert.version = '0.0.1'; | ||
ReactAlert.version = '0.0.1'; | ||
export default Alert; | ||
export default ReactAlert; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14816
27