Skip to content
This repository was archived by the owner on Oct 4, 2020. It is now read-only.

Commit d1bb973

Browse files
committed
Initial commit
1 parent 8d4270f commit d1bb973

File tree

8 files changed

+172
-1
lines changed

8 files changed

+172
-1
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/bower_components/
2+
/node_modules/
3+
/.pulp-cache/
4+
/output/
5+
/.psci*
6+
/src/.webpack.js

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# purescript-react-addons-css-transition-group
22

3-
CSS Transition Groups for purescript-react
3+
A PureScript interface to `ReactCSSTransitionGroup` for use with [`purescript-react`](https://github.com/purescript-contrib/purescript-react).
4+
5+
Please see [React's Animation documentation](https://facebook.github.io/react/docs/animation.html) for details concerning proper usage. This API is byte-for-byte compatible.

bower.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "purescript-react-addons-css-transition-group",
3+
"version": "0.1.0",
4+
"main": "",
5+
"keywords": [
6+
"purescript",
7+
"react",
8+
"add-ons",
9+
"addons",
10+
"ReactCSSTransitionGroup",
11+
"ReactTransitions"
12+
],
13+
"repository": {
14+
"type": "git",
15+
"url": "https://github.com/purescript-contrib/purescript-react-addons-css-transition-group"
16+
},
17+
"license": "MIT",
18+
"ignore": [
19+
"*",
20+
"!src/**/*"
21+
],
22+
"dependencies": {
23+
"purescript-react": "^0.7.1"
24+
}
25+
}

docs/React/Addons/Animation/Props.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
## Module React.Addons.Animation.Props
2+
3+
See the [Animation section](https://facebook.github.io/react/docs/animation.html) of the React documentation for details concerning usage/API.
4+
This API is byte-for-byte compatible.
5+
Note: You must `npm install react-addons-css-transition-group` to use this module.
6+
7+
#### `transitionName`
8+
9+
``` purescript
10+
transitionName :: String -> Props
11+
```
12+
13+
#### `TransitionNames`
14+
15+
``` purescript
16+
type TransitionNames = { enter :: String, enterActive :: String, leave :: String, leaveActive :: String, appearActive :: String }
17+
```
18+
19+
#### `transitionName'`
20+
21+
``` purescript
22+
transitionName' :: TransitionNames -> Props
23+
```
24+
25+
#### `transitionAppear`
26+
27+
``` purescript
28+
transitionAppear :: Boolean -> Props
29+
```
30+
31+
#### `transitionEnter`
32+
33+
``` purescript
34+
transitionEnter :: Boolean -> Props
35+
```
36+
37+
#### `transitionLeave`
38+
39+
``` purescript
40+
transitionLeave :: Boolean -> Props
41+
```
42+
43+
#### `transitionEnterTimeout`
44+
45+
``` purescript
46+
transitionEnterTimeout :: Int -> Props
47+
```
48+
49+
#### `transitionLeaveTimeout`
50+
51+
``` purescript
52+
transitionLeaveTimeout :: Int -> Props
53+
```
54+
55+
#### `component`
56+
57+
``` purescript
58+
component :: String -> Props
59+
```
60+
61+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Module React.Addons.Animation.Transition
2+
3+
See the [Animation section](https://facebook.github.io/react/docs/animation.html) of the React documentation for details concerning usage/API.
4+
This API is byte-for-byte compatible.
5+
Note: You must `npm install react-addons-css-transition-group` to use this module.
6+
7+
#### `reactCSSTransitionGroup`
8+
9+
``` purescript
10+
reactCSSTransitionGroup :: Array Props -> Array ReactElement -> ReactElement
11+
```
12+
13+

src/React/Addons/Animation/Props.purs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
-- | See the [Animation section](https://facebook.github.io/react/docs/animation.html) of the React documentation for details concerning usage/API.
2+
-- | This API is byte-for-byte compatible.
3+
4+
-- | Note: You must `npm install react-addons-css-transition-group` to use this module.
5+
6+
module React.Addons.Animation.Props where
7+
8+
import React.DOM.Props
9+
10+
transitionName :: String -> Props
11+
transitionName = unsafeMkProps "transitionName"
12+
13+
type TransitionNames =
14+
{ enter :: String
15+
, enterActive :: String
16+
, leave :: String
17+
, leaveActive :: String
18+
, appearActive :: String
19+
}
20+
21+
transitionName' :: TransitionNames -> Props
22+
transitionName' = unsafeUnfoldProps "transitionName"
23+
24+
transitionAppear :: Boolean -> Props
25+
transitionAppear = unsafeMkProps "transitionAppear"
26+
27+
transitionEnter :: Boolean -> Props
28+
transitionEnter = unsafeMkProps "transitionEnter"
29+
30+
transitionLeave :: Boolean -> Props
31+
transitionLeave = unsafeMkProps "transitionLeave"
32+
33+
transitionEnterTimeout :: Int -> Props
34+
transitionEnterTimeout = unsafeMkProps "transitionEnterTimeout"
35+
36+
transitionLeaveTimeout :: Int -> Props
37+
transitionLeaveTimeout = unsafeMkProps "transitionLeaveTimeout"
38+
39+
component :: String -> Props
40+
component = unsafeMkProps "component"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
-- | See the [Animation section](https://facebook.github.io/react/docs/animation.html) of the React documentation for details concerning usage/API.
2+
-- | This API is byte-for-byte compatible.
3+
4+
-- | Note: You must `npm install react-addons-css-transition-group` to use this module.
5+
6+
module React.Addons.Animation.Transition (reactCSSTransitionGroup) where
7+
8+
import Prelude ((<<<))
9+
10+
import React (ReactClass(), ReactElement(), createElementDynamic)
11+
import React.DOM.Props (Props(), unsafeFromPropsArray)
12+
13+
reactCSSTransitionGroup :: Array Props -> Array ReactElement -> ReactElement
14+
reactCSSTransitionGroup = createElementDynamic reactCSSTransitionGroupClass <<< unsafeFromPropsArray
15+
16+
foreign import reactCSSTransitionGroupClass :: forall props. ReactClass props
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* global exports */
2+
"use strict";
3+
4+
// module React.Addons.Animation.Transition
5+
6+
var ReactCSSTransitionGroup = require('react-addons-css-transition-group');
7+
8+
exports.reactCSSTransitionGroupClass = ReactCSSTransitionGroup;

0 commit comments

Comments
 (0)