This repository was archived by the owner on Jan 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathInput.bs.js
More file actions
70 lines (62 loc) · 2 KB
/
Input.bs.js
File metadata and controls
70 lines (62 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Generated by ReScript, PLEASE EDIT WITH CARE
import * as CssJs from "bs-css-emotion/src/CssJs.bs.js";
import * as Theme from "../../lib/Theme.bs.js";
import * as React from "react";
import * as Render from "../../lib/Render.bs.js";
import * as Caml_option from "rescript/lib/es6/caml_option.js";
var label = CssJs.style([
CssJs.fontSize(CssJs.rem(2.0)),
CssJs.color(CssJs.hex(Theme.Colors.black)),
CssJs.fontFamily(Theme.fontFamily),
CssJs.display(CssJs.block),
CssJs.marginBottom(CssJs.rem(0.8))
]);
var input = CssJs.style([
CssJs.height(CssJs.rem(5.6)),
CssJs.width(CssJs.pct(100.0)),
CssJs.background(CssJs.hex(Theme.Colors.lightBlue1)),
CssJs.fontFamily(Theme.fontFamily),
CssJs.fontSize(CssJs.rem(2.0)),
CssJs.borderStyle(CssJs.none),
CssJs.borderRadius(Theme.Radius.small),
CssJs.padding2(CssJs.zero, CssJs.rem(2.4)),
CssJs.boxSizing(CssJs.borderBox),
CssJs.color(CssJs.hex(Theme.Colors.black)),
CssJs.outlineStyle(CssJs.none),
CssJs.placeholder([CssJs.color(CssJs.hex(Theme.Colors.gray2))])
]);
var Styles = {
label: label,
input: input
};
function Input(Props) {
var placeholder = Props.placeholder;
var name = Props.name;
var onChange = Props.onChange;
var type_ = Props.type_;
var label$1 = Props.label;
var tmp = {
className: input
};
if (name !== undefined) {
tmp.name = Caml_option.valFromOption(name);
}
if (placeholder !== undefined) {
tmp.placeholder = Caml_option.valFromOption(placeholder);
}
if (type_ !== undefined) {
tmp.type = Caml_option.valFromOption(type_);
}
if (onChange !== undefined) {
tmp.onChange = Caml_option.valFromOption(onChange);
}
return React.createElement("div", undefined, label$1 !== undefined ? React.createElement("label", {
className: label
}, Render.s(label$1)) : null, React.createElement("input", tmp));
}
var make = Input;
export {
Styles ,
make ,
}
/* label Not a pure module */