diff --git a/website/src/components/Playground/LayoutRecord.js b/website/src/components/Playground/LayoutRecord.js index 7822ca6b..b9657490 100644 --- a/website/src/components/Playground/LayoutRecord.js +++ b/website/src/components/Playground/LayoutRecord.js @@ -21,7 +21,7 @@ import type { Yoga$JustifyContent, Yoga$FlexDirection, Yoga$FlexWrap, - Yoga$PositionType, + Yoga$YogaPositionType, } from 'yoga-layout'; export type LayoutRecordT = RecordOf<{ @@ -32,7 +32,7 @@ export type LayoutRecordT = RecordOf<{ border: PositionRecordT, margin: PositionRecordT, position: PositionRecordT, - positionType: Yoga$PositionType, + positionType: Yoga$YogaPositionType, alignItems?: Yoga$Align, alignSelf?: Yoga$Align, alignContent?: Yoga$Align, @@ -44,6 +44,10 @@ export type LayoutRecordT = RecordOf<{ flexWrap?: Yoga$FlexWrap, aspectRatio?: number, children?: List, + minWidth?: number, + maxWidth?: number, + minHeight?: number, + maxHeight?: number, }>; const r: LayoutRecordT = Record({ @@ -65,6 +69,10 @@ const r: LayoutRecordT = Record({ flexShrink: 1, children: List(), aspectRatio: 'auto', + minWidth: undefined, + maxWidth: undefined, + minHeight: undefined, + maxHeight: undefined, }); export default r; diff --git a/website/src/components/Playground/YogaNode.js b/website/src/components/Playground/YogaNode.js index fdc7a281..81c0a7b9 100644 --- a/website/src/components/Playground/YogaNode.js +++ b/website/src/components/Playground/YogaNode.js @@ -107,6 +107,10 @@ export default class YogaNode extends Component { const root = Node.create(); root.setWidth(layoutDefinition.width); root.setHeight(layoutDefinition.height); + root.setMinWidth(layoutDefinition.minWidth); + root.setMaxWidth(layoutDefinition.maxWidth); + root.setMinHeight(layoutDefinition.minHeight); + root.setMaxHeight(layoutDefinition.maxHeight); root.setJustifyContent(layoutDefinition.justifyContent); root.setAlignItems(layoutDefinition.alignItems); root.setAlignSelf(layoutDefinition.alignSelf);