Skip to content

Commit bf8be30

Browse files
authored
Move Margin and Size modules out of Style module. (#455)
1 parent 3ad271f commit bf8be30

8 files changed

Lines changed: 44 additions & 31 deletions

File tree

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
'use strict';
22

33

4-
function pct(num) {
5-
return num.toString() + "%";
6-
}
7-
8-
var Margin = /* module */[
9-
/* pct */pct,
10-
/* auto */"auto"
11-
];
12-
13-
var Size = /* module */[/* pct */pct];
14-
154
function deg(num) {
165
return num.toString() + "deg";
176
}
@@ -25,8 +14,5 @@ var Transform = /* module */[
2514
/* rad */rad
2615
];
2716

28-
exports.pct = pct;
29-
exports.Margin = Margin;
30-
exports.Size = Size;
3117
exports.Transform = Transform;
3218
/* No side effect */

‎reason-react-native/src/apis/Style.re‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
let pct = num => num->Js.Float.toString ++ "%";
2-
3-
module Margin = {
4-
type t;
5-
6-
external pt: float => t = "%identity";
7-
let pct: float => t = pct->Obj.magic;
8-
let auto: t = "auto"->Obj.magic;
9-
};
10-
11-
module Size = {
12-
type t;
13-
14-
external pt: float => t = "%identity";
15-
let pct: float => t = pct->Obj.magic;
16-
};
17-
181
module Transform = {
192
type angle;
203

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
4+
function pct(num) {
5+
return num.toString() + "%";
6+
}
7+
8+
exports.pct = pct;
9+
/* No side effect */
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
type t = string;
2+
3+
external pt: float => t = "%identity";
4+
5+
let pct = num => num->Js.Float.toString ++ "%";
6+
7+
[@bs.inline]
8+
let auto = "auto";
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
type t;
2+
3+
external pt: float => t = "%identity";
4+
5+
let pct: float => t;
6+
7+
[@bs.inline "auto"]
8+
let auto: t;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
4+
function pct(num) {
5+
return num.toString() + "%";
6+
}
7+
8+
exports.pct = pct;
9+
/* No side effect */
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
type t = string;
2+
3+
external pt: float => t = "%identity";
4+
5+
let pct = num => num->Js.Float.toString ++ "%";
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
type t;
2+
3+
external pt: float => t = "%identity";
4+
5+
let pct: float => t;

0 commit comments

Comments
 (0)