Copy review

Reviewed By: danielbuechele

Differential Revision: D7009457

fbshipit-source-id: d5053751a2bde369a65a740c03ace5bbd2eec02f
This commit is contained in:
Emil Sjölander
2018-02-16 06:41:54 -08:00
committed by Facebook Github Bot
parent 0c74a72fac
commit bba81781af
9 changed files with 74 additions and 79 deletions

View File

@@ -6,43 +6,23 @@ hasPlayground: true
## Max / Min Width and Height
All the following properties set the maximum and minimum size constraints of an element.
These properties have higher priority than all other properties and will always be respected.
Constraints can be specified as either absolute pixel values or as percentages of their
parent's size. By default all these constraints are undefined.
### Max Width
The `maxWidth` property sets the maximum width of an element. It prevents the used value of the width property from becoming larger than the value specified by `maxWidth `
<controls prop="maxWidth"></controls>
### Min Width
The `minWidth` property sets the minimum width of an element. It prevents the used value of the width property from becoming smaller than the value specified by `width `.
`minWidth` overrides both `maxWidth` and `width`. Try out this in playground.
<controls prop="minWidth"></controls>
### Max Height
The `maxHeight` property sets the maximum height of an element. It prevents the used value of the height property from becoming larger than the value specified by `maxHeight`.
<controls prop="maxHeight"></controls>
### Min Width
The `minHeight` property sets the minimum height of an element. It prevents the used value of the height property from becoming smaller than the value specified by `height`.
`minHeight ` overrides both `maxHeight` and `height`. Try out this in playground.
Each of the above properties can take the following values
### Pixel
One can specify the pixel values for each of the above properties
### Percentages
One can specifiy min/max values in terms of the percentage of its parent.
Try out the above properties in playground.
#### Max Width
<controls prop="maxWidth"></controls>
#### Min Width
<controls prop="minWidth"></controls>
#### Max Height
<controls prop="maxHeight"></controls>
#### Min Height
<controls prop="minHeight"></controls>