Summary: Add a convenience construction method for CSSNode. CSSNode node = CSSNode.Create( positionType: CSSPositionType.Absolute, wrap: CSSWrap.Wrap, position: new Spacing(top:6, right:4), margin: new Spacing(bottom:5, left:3)); Reviewed By: emilsjolander Differential Revision: D4193380 fbshipit-source-id: 30b917f64e92997355a76e3b11799883b86fb9de
32 lines
773 B
C#
32 lines
773 B
C#
/**
|
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
namespace Facebook.CSSLayout
|
|
{
|
|
public class Spacing
|
|
{
|
|
public float? Top;
|
|
public float? Bottom;
|
|
public float? Left;
|
|
public float? Right;
|
|
|
|
public Spacing(
|
|
float? top = null,
|
|
float? bottom = null,
|
|
float? left = null,
|
|
float? right = null)
|
|
{
|
|
Top = top;
|
|
Bottom = bottom;
|
|
Left = left;
|
|
Right = right;
|
|
}
|
|
}
|
|
}
|