diff --git a/website/src/components/Playground/EditValue.js b/website/src/components/Playground/EditValue.js index 4ec3087b..4cfaffc9 100644 --- a/website/src/components/Playground/EditValue.js +++ b/website/src/components/Playground/EditValue.js @@ -33,7 +33,7 @@ export default (props: Props<*>) => { type="text" {...props} onChange={e => props.onChange(props.property, e.target.value)} - placeholder="undefined" + placeholder={props.placeholder || 'undefined'} onFocus={e => e.target.select()} value={Number.isNaN(props.value) ? '' : props.value} /> diff --git a/website/src/components/Playground/Editor.js b/website/src/components/Playground/Editor.js index a2f26bd0..af7df0e2 100644 --- a/website/src/components/Playground/Editor.js +++ b/website/src/components/Playground/Editor.js @@ -89,6 +89,7 @@ export default class Editor extends Component { { { { /> +

+ Max-Width × Max-Height + + Maximum dimensions of the node + +

+ + + + + + + + +

+ Min-Width × Min-Height + + Minimum dimensions of the node + +

+ + + + + + + +

Aspect Ratio @@ -277,7 +336,8 @@ export default class Editor extends Component { icon="plus-circle-o" disabled={!Boolean(this.props.onAdd)} onClick={this.props.onAdd} - type="primary"> + type="primary" + > add child node @@ -286,7 +346,8 @@ export default class Editor extends Component { icon="close-circle-o" disabled={!Boolean(this.props.onRemove)} onClick={this.props.onRemove} - type="danger"> + type="danger" + > remove node diff --git a/website/src/components/Playground/LayoutRecord.js b/website/src/components/Playground/LayoutRecord.js index 08c67b92..4c37a3ed 100644 --- a/website/src/components/Playground/LayoutRecord.js +++ b/website/src/components/Playground/LayoutRecord.js @@ -19,18 +19,22 @@ import type { Yoga$JustifyContent, Yoga$FlexDirection, Yoga$FlexWrap, - Yoga$YogaPositionType, + Yoga$PositionType, } from 'yoga-layout'; export type LayoutRecordT = RecordOf<{ width?: ?number, height?: ?number, + minWidth?: ?number, + minHeight?: ?number, + maxWidth?: ?number, + maxHeight?: ?number, justifyContent?: Yoga$JustifyContent, padding: PositionRecordT, border: PositionRecordT, margin: PositionRecordT, position: PositionRecordT, - positionType: Yoga$YogaPositionType, + positionType: Yoga$PositionType, alignItems?: Yoga$Align, alignSelf?: Yoga$Align, alignContent?: Yoga$Align, @@ -51,6 +55,10 @@ export type LayoutRecordT = RecordOf<{ const r: LayoutRecordT = Record({ width: 'auto', height: 'auto', + minWidth: 0, + minHeight: 0, + maxWidth: 'none', + maxHeight: 'none', justifyContent: yoga.JUSTIFY_FLEX_START, alignItems: yoga.ALIGN_STRETCH, alignSelf: yoga.ALIGN_AUTO,