Skip to content

Commit f753b9f

Browse files
Cootpaf31
Coot
authored andcommitted
Update for react-15 (#99)
* use create-react-class * Add node_modules to .gitignore * react-15: add events * onTransitionStart is not supported * Add suppressContentEditableWarning prop. * update package.json
1 parent 4154696 commit f753b9f

File tree

4 files changed

+32
-2
lines changed

4 files changed

+32
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.psci*
22
bower_components/
3+
node_modules/
34
output/
45
.psc-package
56
.psc-ide-port

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "purescript-react",
33
"files": [],
44
"peerDependencies": {
5-
"react": "^0.14.3"
5+
"react": "^15.6.1",
6+
"create-react-class": "^15.6.0"
67
}
78
}

src/React.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"use strict";
33

44
var React = require("react");
5+
var createReactClass = require("create-react-class");
56

67
function getProps(this_) {
78
return function(){
@@ -117,7 +118,7 @@ function createClass(spec) {
117118
}
118119
};
119120

120-
return React.createClass(result);
121+
return createReactClass(result);
121122
}
122123
exports.createClass = createClass;
123124

src/React/DOM/Props.purs

+27
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,26 @@ security = unsafeMkProps "security"
458458
unselectable :: Boolean -> Props
459459
unselectable = unsafeMkProps "unselectable"
460460

461+
onAnimationStart :: forall eff props state result.
462+
(Event -> EventHandlerContext eff props state result) -> Props
463+
onAnimationStart f = unsafeMkProps "onAnimationStart" (handle f)
464+
465+
onAnimationEnd :: forall eff props state result.
466+
(Event -> EventHandlerContext eff props state result) -> Props
467+
onAnimationEnd f = unsafeMkProps "onAnimationEnd" (handle f)
468+
469+
onAnimationIteration :: forall eff props state result.
470+
(Event -> EventHandlerContext eff props state result) -> Props
471+
onAnimationIteration f = unsafeMkProps "onAnimationIteration" (handle f)
472+
473+
onTransitionEnd :: forall eff props state result.
474+
(Event -> EventHandlerContext eff props state result) -> Props
475+
onTransitionEnd f = unsafeMkProps "onTransitionEnd" (handle f)
476+
477+
onLoad :: forall eff props state result.
478+
(Event -> EventHandlerContext eff props state result) -> Props
479+
onLoad f = unsafeMkProps "onLoad" (handle f)
480+
461481
onCopy :: forall eff props state result.
462482
(Event -> EventHandlerContext eff props state result) -> Props
463483
onCopy f = unsafeMkProps "onCopy" (handle f)
@@ -498,6 +518,10 @@ onInput :: forall eff props state result.
498518
(Event -> EventHandlerContext eff props state result) -> Props
499519
onInput f = unsafeMkProps "onInput" (handle f)
500520

521+
onInvalid :: forall eff props state result.
522+
(Event -> EventHandlerContext eff props state result) -> Props
523+
onInvalid f = unsafeMkProps "onInvalid" (handle f)
524+
501525
onSubmit :: forall eff props state result.
502526
(Event -> EventHandlerContext eff props state result) -> Props
503527
onSubmit f = unsafeMkProps "onSubmit" (handle f)
@@ -593,3 +617,6 @@ onScroll f = unsafeMkProps "onScroll" (handle f)
593617
onWheel :: forall eff props state result.
594618
(Event -> EventHandlerContext eff props state result) -> Props
595619
onWheel f = unsafeMkProps "onWheel" (handle f)
620+
621+
suppressContentEditableWarning :: Boolean -> Props
622+
suppressContentEditableWarning = unsafeMkProps "suppressContentEditableWarning"

0 commit comments

Comments
 (0)