github.com/jgarto/itcv@v0.0.0-20180826224514-4eea09c1aa0d/gen_react_cssGen.go (about)

     1  // Code generated by cssGen. DO NOT EDIT.
     2  
     3  package react
     4  
     5  import "github.com/gopherjs/gopherjs/js"
     6  
     7  // CSS defines CSS attributes for HTML components. Largely based on
     8  // https://developer.mozilla.org/en-US/docs/Web/CSS/Reference
     9  //
    10  type CSS struct {
    11  	o *js.Object
    12  
    13  	Float     string
    14  	FontSize  string
    15  	FontStyle string
    16  	Height    string
    17  	Left      string
    18  	MarginTop string
    19  	MaxHeight string
    20  	MinHeight string
    21  	Overflow  string
    22  	OverflowY string
    23  	Position  string
    24  	Resize    string
    25  	Top       string
    26  	Width     string
    27  	ZIndex    string
    28  }
    29  
    30  // TODO: until we have a resolution on
    31  // https://github.com/gopherjs/gopherjs/issues/236 we define hack() below
    32  
    33  func (c *CSS) hack() *CSS {
    34  	if c == nil {
    35  		return nil
    36  	}
    37  
    38  	o := object.New()
    39  
    40  	o.Set("float", c.Float)
    41  	o.Set("fontSize", c.FontSize)
    42  	o.Set("fontStyle", c.FontStyle)
    43  	o.Set("height", c.Height)
    44  	o.Set("left", c.Left)
    45  	o.Set("marginTop", c.MarginTop)
    46  	o.Set("maxHeight", c.MaxHeight)
    47  	o.Set("minHeight", c.MinHeight)
    48  	o.Set("overflow", c.Overflow)
    49  	o.Set("overflowY", c.OverflowY)
    50  	o.Set("position", c.Position)
    51  	o.Set("resize", c.Resize)
    52  	o.Set("top", c.Top)
    53  	o.Set("width", c.Width)
    54  	o.Set("zIndex", c.ZIndex)
    55  
    56  	return &CSS{o: o}
    57  }