Skip to content

Commit 5a393e4

Browse files
committed
Add Animation binding (1)
1 parent 9e1bb1d commit 5a393e4

File tree

1 file changed

+172
-0
lines changed

1 file changed

+172
-0
lines changed

src/Animation.re

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
type reactFindDOMNode = option(Dom.element);
2+
3+
module Fade = {
4+
[@bs.module "rsuite"] [@bs.scope "Animation"] [@react.component]
5+
external make:
6+
(
7+
~style: ReactDOMRe.Style.t=?,
8+
~children: React.element=?,
9+
~className: string=?,
10+
11+
~enteredClassName: string=?,
12+
~enteringClassName: string=?,
13+
~exitedClassName: string=?,
14+
~exitingClassName: string=?,
15+
~_in: bool=?,
16+
// todo: different signatures off repo / off docs
17+
~onEnter: (reactFindDOMNode) => unit=?,
18+
~onEntered: (reactFindDOMNode) => unit=?,
19+
~onEntering: (reactFindDOMNode) => unit=?,
20+
21+
~onExit: (reactFindDOMNode) => unit=?,
22+
~onExited: (reactFindDOMNode) => unit=?,
23+
~onExiting: (reactFindDOMNode) => unit=?,
24+
25+
~timeout: int=?,
26+
~transitionAppear: bool=?,
27+
~unmountOnExit: bool=?,
28+
) =>
29+
React.element =
30+
"Fade";
31+
};
32+
33+
module Collapse = {
34+
[@bs.module "rsuite"] [@bs.scope "Animation"] [@react.component]
35+
external make:
36+
(
37+
~style: ReactDOMRe.Style.t=?,
38+
~children: React.element=?,
39+
~className: string=?,
40+
41+
~dimension: [@bs.string] [
42+
| `height
43+
| `width
44+
]=?, // todo + callback () => `height | `width
45+
~enteredClassName: string=?,
46+
~enteringClassName: string=?,
47+
~exitedClassName: string=?,
48+
~exitingClassName: string=?,
49+
~getDimensionValue: (unit) => int=?,
50+
~_in: bool=?,
51+
52+
~onEnter: (reactFindDOMNode) => unit=?,
53+
~onEntered: (reactFindDOMNode) => unit=?,
54+
~onEntering: (reactFindDOMNode) => unit=?,
55+
56+
~onExit: (reactFindDOMNode) => unit=?,
57+
~onExited: (reactFindDOMNode) => unit=?,
58+
~onExiting: (reactFindDOMNode) => unit=?,
59+
~role: string=?,
60+
~timeout: int=?,
61+
~transitionAppear: bool=?,
62+
~unmountOnExit: bool=?,
63+
) =>
64+
React.element =
65+
"Collapse";
66+
};
67+
68+
module Bounce = {
69+
[@bs.module "rsuite"] [@bs.scope "Animation"] [@react.component]
70+
external make:
71+
(
72+
~style: ReactDOMRe.Style.t=?,
73+
~children: React.element=?,
74+
~className: string=?,
75+
76+
~enteredClassName: string=?,
77+
~enteringClassName: string=?,
78+
~exitedClassName: string=?,
79+
~exitingClassName: string=?,
80+
~_in: bool=?,
81+
// todo: different signatures off repo / off docs
82+
~onEnter: (reactFindDOMNode) => unit=?,
83+
~onEntered: (reactFindDOMNode) => unit=?,
84+
~onEntering: (reactFindDOMNode) => unit=?,
85+
86+
~onExit: (reactFindDOMNode) => unit=?,
87+
~onExited: (reactFindDOMNode) => unit=?,
88+
~onExiting: (reactFindDOMNode) => unit=?,
89+
90+
~timeout: int=?,
91+
~transitionAppear: bool=?,
92+
~unmountOnExit: bool=?,
93+
) =>
94+
React.element =
95+
"Bounce";
96+
};
97+
98+
module Slide = {
99+
[@bs.module "rsuite"] [@bs.scope "Animation"] [@react.component]
100+
external make:
101+
(
102+
~style: ReactDOMRe.Style.t=?,
103+
~children: React.element=?,
104+
~className: string=?,
105+
106+
~enteredClassName: string=?,
107+
~enteringClassName: string=?,
108+
~exitedClassName: string=?,
109+
~exitingClassName: string=?,
110+
~_in: bool=?,
111+
// todo: different signatures off repo / off docs
112+
~onEnter: (reactFindDOMNode) => unit=?,
113+
~onEntered: (reactFindDOMNode) => unit=?,
114+
~onEntering: (reactFindDOMNode) => unit=?,
115+
116+
~onExit: (reactFindDOMNode) => unit=?,
117+
~onExited: (reactFindDOMNode) => unit=?,
118+
~onExiting: (reactFindDOMNode) => unit=?,
119+
120+
~timeout: int=?,
121+
~transitionAppear: bool=?,
122+
~unmountOnExit: bool=?,
123+
~placement: [@bs.string] [
124+
| `left
125+
| `leftStart
126+
| `leftEnd
127+
| `right
128+
| `rightStart
129+
| `rightEnd
130+
| `top
131+
| `topStart
132+
| `topEnd
133+
| `bottom
134+
| `bottomStart
135+
| `bottomEnd
136+
]=?,
137+
) =>
138+
React.element =
139+
"Slide";
140+
};
141+
142+
module Transition = {
143+
[@bs.module "rsuite"] [@bs.scope "Animation"] [@react.component]
144+
external make:
145+
(
146+
~style: ReactDOMRe.Style.t=?,
147+
~children: React.element=?,
148+
~classPrefix: string=?,
149+
~className: string=?,
150+
151+
~enteredClassName: string=?,
152+
~enteringClassName: string=?,
153+
~exitedClassName: string=?,
154+
~exitingClassName: string=?,
155+
~_in: bool=?,
156+
// todo: different signatures off repo / off docs
157+
~onEnter: (reactFindDOMNode) => unit=?,
158+
~onEntered: (reactFindDOMNode) => unit=?,
159+
~onEntering: (reactFindDOMNode) => unit=?,
160+
161+
~onExit: (reactFindDOMNode) => unit=?,
162+
~onExited: (reactFindDOMNode) => unit=?,
163+
~onExiting: (reactFindDOMNode) => unit=?,
164+
165+
~timeout: int=?,
166+
~transitionAppear: bool=?,
167+
~unmountOnExit: bool=?
168+
) =>
169+
React.element =
170+
"Transition";
171+
};
172+

0 commit comments

Comments
 (0)