|
1 | 1 | type t; |
2 | 2 |
|
| 3 | +external array: array(t) => t = "%identity"; |
| 4 | +external arrayOption: array(option(t)) => t = "%identity"; |
| 5 | +/* list works too since RN accept recursive array of styles (ocaml list are recursive arrays in JS)*/ |
| 6 | +external list: list(t) => t = "%identity"; |
| 7 | +external listOption: list(option(t)) => t = "%identity"; |
| 8 | + |
| 9 | +// Escape hatch, in case something is added into RN but unsupported, |
| 10 | +// Useful if you play with fancy platforms |
| 11 | +// Use with caution |
| 12 | +[@bs.val] |
| 13 | +external unsafeAddStyle: ([@bs.as {json|{}|json}] _, t, Js.t('a)) => t = |
| 14 | + "Object.assign"; |
| 15 | + |
| 16 | +external unsafeStyle: Js.t('a) => t = "%identity"; |
| 17 | + |
3 | 18 | type size = string; |
4 | 19 |
|
5 | 20 | external pt: float => size = "%identity"; |
@@ -33,6 +48,8 @@ type transform; |
33 | 48 | [@bs.obj] external skewY: (~skewY: angle) => transform = ""; |
34 | 49 | // @todo matrix |
35 | 50 |
|
| 51 | +external unsafeTransform: Js.t('a) => transform = "%identity"; |
| 52 | + |
36 | 53 | [@bs.obj] |
37 | 54 | // Layout Props (https://facebook.github.io/react-native/docs/layout-props#props) |
38 | 55 | // View Style Props https://facebook.github.io/react-native/docs/view-style-props#props |
@@ -222,40 +239,3 @@ external style: |
222 | 239 | ) => |
223 | 240 | t = |
224 | 241 | ""; |
225 | | - |
226 | | -/* |
227 | | - <View style=array([| |
228 | | - styles##thing, |
229 | | - styles##whatever, |
230 | | - |])> |
231 | | - */ |
232 | | -external array: array(t) => t = "%identity"; |
233 | | - |
234 | | -/* |
235 | | - <View style=arrayOption([| |
236 | | - Some(styles##thing), |
237 | | - Some(styles##whatever), |
238 | | - optionalStyle, |
239 | | - cond ? Some({something:"dynamic"}) : None |
240 | | - |])> |
241 | | - */ |
242 | | -external arrayOption: array(option(t)) => t = "%identity"; |
243 | | - |
244 | | -/* list works too since RN accept recursive array of styles (list are just recursive arrays)*/ |
245 | | -/* |
246 | | - <View style=list([ |
247 | | - styles##thing, |
248 | | - styles##whatever, |
249 | | - ])> |
250 | | - */ |
251 | | -external list: list(t) => t = "%identity"; |
252 | | - |
253 | | -/* |
254 | | - <View style=listOption([ |
255 | | - Some(styles##thing), |
256 | | - Some(styles##whatever), |
257 | | - optionalStyle, |
258 | | - cond ? Some({something:"dynamic"}) : None |
259 | | - ])> |
260 | | - */ |
261 | | -external listOption: list(option(t)) => t = "%identity"; |
0 commit comments