forked from myitcv/react
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgen_react_cssGen.go
57 lines (48 loc) · 1.16 KB
/
gen_react_cssGen.go
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
// Code generated by cssGen. DO NOT EDIT.
package react
import "github.com/gopherjs/gopherjs/js"
// CSS defines CSS attributes for HTML components. Largely based on
// https://developer.mozilla.org/en-US/docs/Web/CSS/Reference
//
type CSS struct {
o *js.Object
Float string
FontSize string
FontStyle string
Height string
Left string
MarginTop string
MaxHeight string
MinHeight string
Overflow string
OverflowY string
Position string
Resize string
Top string
Width string
ZIndex string
}
// TODO: until we have a resolution on
// https://github.com/gopherjs/gopherjs/issues/236 we define hack() below
func (c *CSS) hack() *CSS {
if c == nil {
return nil
}
o := object.New()
o.Set("float", c.Float)
o.Set("fontSize", c.FontSize)
o.Set("fontStyle", c.FontStyle)
o.Set("height", c.Height)
o.Set("left", c.Left)
o.Set("marginTop", c.MarginTop)
o.Set("maxHeight", c.MaxHeight)
o.Set("minHeight", c.MinHeight)
o.Set("overflow", c.Overflow)
o.Set("overflowY", c.OverflowY)
o.Set("position", c.Position)
o.Set("resize", c.Resize)
o.Set("top", c.Top)
o.Set("width", c.Width)
o.Set("zIndex", c.ZIndex)
return &CSS{o: o}
}