react-crouton
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -6,3 +6,3 @@ // __test__/crouton-test.js | ||
var React = require('react/addons') | ||
var Crouton = require('../index.js') | ||
var Crouton = React.createFactory(require('../index.js')) | ||
var TestUtils = React.addons.TestUtils | ||
@@ -9,0 +9,0 @@ |
@@ -129,2 +129,11 @@ /** | ||
onDismiss: 'onDismiss' | ||
},,{ | ||
message: 'Simple example with one custom class button and listener', | ||
type: 'info', | ||
buttons: [{ | ||
name: 'close', | ||
className: 'btn close', | ||
listener: 'listener' | ||
}], | ||
onDismiss: 'onDismiss' | ||
},{ | ||
@@ -141,2 +150,13 @@ message: 'Simple example with two button and listener', | ||
},{ | ||
message: 'Simple example with two custom class button and listener', | ||
type: 'info', | ||
buttons: [{ | ||
name: 'retry', | ||
listener: 'listener' | ||
},{ | ||
name: 'close', | ||
className: 'btn close' | ||
}], | ||
onDismiss: 'onDismiss' | ||
},{ | ||
message: 'Simple example with two button and listener', | ||
@@ -143,0 +163,0 @@ type: 'info', |
@@ -46,2 +46,4 @@ var React = require('react'); | ||
* <Crouton buttons=[{name: 'close', listener: somefunction}] /> | ||
* or | ||
* <Crouton buttons=[{name: 'close', className: 'btn close', listener: somefunction}] /> | ||
* ``` | ||
@@ -56,2 +58,3 @@ */ | ||
name: PropTypes.string, | ||
className: PropTypes.string, | ||
listener: PropTypes.func | ||
@@ -167,3 +170,3 @@ })) | ||
key: i, | ||
className: button.name.toLowerCase(), | ||
className: button.className ? button.className : button.name.toLowerCase(), | ||
onClick: this.handleClick | ||
@@ -170,0 +173,0 @@ }, button.name) |
{ | ||
"name": "react-crouton", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "A message component for reactjs.", | ||
@@ -17,3 +17,3 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "jest", | ||
"test": "./node_modules/.bin/jest", | ||
"watch": "./node_modules/.bin/gulp watch --gulpfile example/gulpfile.js", | ||
@@ -43,3 +43,3 @@ "deploy": "./node_modules/.bin/gulp deploy --gulpfile example/gulpfile.js" | ||
"gulp-size": "^1.1.0", | ||
"jest-cli": "^0.1.18", | ||
"jest-cli": "^0.2.2", | ||
"react": "^0.12.1", | ||
@@ -46,0 +46,0 @@ "reactify": "^0.17.1" |
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
20337
10
490