Beispiel #1
0
 public static ReactStyle Padding(this ReactStyle style, Union <string, int> top, Union <string, int> right, Union <string, int> bottom, Union <string, int> left)
 {
     style.PaddingTop    = top;
     style.PaddingLeft   = left;
     style.PaddingRight  = right;
     style.PaddingBottom = bottom;
     return(style);
 }
Beispiel #2
0
 public static ReactStyle Margin(this ReactStyle style, Union <string, int> top, Union <string, int> right, Union <string, int> bottom, Union <string, int> left)
 {
     style.MarginTop    = top;
     style.MarginLeft   = left;
     style.MarginRight  = right;
     style.MarginBottom = bottom;
     return(style);
 }
 public static ReactStyle MergeWith(this ReactStyle source, ReactStyle other)
 {
     var merged = Script.Write<ReactStyle>("{ }");
     /*@
     if (source) {
         for (var i in source) {
             merged[i] = source[i];
         }
     }
     if (other) {
         for (var i in other) {
             merged[i] = other[i];
         }
     }
     */
     return merged;
 }
Beispiel #4
0
        public static ReactStyle MergeWith(this ReactStyle source, ReactStyle other)
        {
            var merged = Script.Write <ReactStyle>("{ }");

            /*@
             * if (source) {
             *  for (var i in source) {
             *      merged[i] = source[i];
             *  }
             * }
             * if (other) {
             *  for (var i in other) {
             *      merged[i] = other[i];
             *  }
             * }
             */
            return(merged);
        }
Beispiel #5
0
 public static ReactStyle Margin(this ReactStyle style, Union <string, int> margin)
 {
     style.Margin = margin;
     return(style);
 }
Beispiel #6
0
 public static ReactStyle FontSize(this ReactStyle style, Union <string, int> fontSize)
 {
     style.FontSize = fontSize;
     return(style);
 }
Beispiel #7
0
 public static ReactStyle Width(this ReactStyle style, Union <string, int> width)
 {
     style.Width = width;
     return(style);
 }
Beispiel #8
0
 public static ReactStyle Height(this ReactStyle style, Union <string, int> height)
 {
     style.Height = height;
     return(style);
 }
Beispiel #9
0
 public static ReactStyle Padding(this ReactStyle style, Union <string, int> padding)
 {
     style.Padding = padding;
     return(style);
 }