Add display documentation (#1596)

Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1596

tsia

Reviewed By: yungsters

Differential Revision: D54775960

fbshipit-source-id: 0d9e782cd9badb3071112038ff6ce40c2ae2c6e4
This commit is contained in:
Joe Vilches
2024-03-12 11:31:46 -07:00
committed by Facebook GitHub Bot
parent 8a6c092693
commit 7d537eff41

View File

@@ -2,4 +2,24 @@
sidebar_position: 4
---
import Playground from '@site/src/components/Playground';
# Display
Display controls which layout specification to follow.
**Flex (default)**: The CSS Flexible Box Model specification.
**None**: The node is removed from the layout tree and will not be visible.
<Playground code={`<Layout config={{useWebDefaults: false}}>
<Node
style={{
width: 200,
height: 200,
padding: 20,
}}>
<Node style={{margin: 5, height: 50, display: 'flex'}} />
<Node style={{margin: 5, height: 50, display: 'none'}} />
</Node>
</Layout>`} />