update docs for Transforms
Summary: Documentation change only. Filled out the Transforms docs a little more to indicate which props are now deprecated and to provide some guidance on the transform array since some values are expected to be strings and some are numbers http://facebook.github.io/react-native/docs/transforms.html Closes https://github.com/facebook/react-native/pull/15261 Differential Revision: D5518925 Pulled By: hramos fbshipit-source-id: 9aacf2c23e85573e150feb8c34e8bed54ad565d5
This commit is contained in:
parent
278cd5747f
commit
404d74bd1e
|
@ -42,6 +42,22 @@ var DecomposedMatrixPropType = function(
|
|||
};
|
||||
|
||||
var TransformPropTypes = {
|
||||
/**
|
||||
* `transform` accepts an array of transformation objects. Each object specifies
|
||||
* the property that will be transformed as the key, and the value to use in the
|
||||
* transformation. Objects should not be combined. Use a single key/value pair
|
||||
* per object.
|
||||
*
|
||||
* The rotate transformations require a string so that the transform may be
|
||||
* expressed in degrees (deg) or radians (rad). For example:
|
||||
*
|
||||
* `transform([{ rotateX: '45deg' }, { rotateZ: '0.785398rad' }])`
|
||||
*
|
||||
* The skew transformations require a string so that the transform may be
|
||||
* expressed in degrees (deg). For example:
|
||||
*
|
||||
* `transform([{ skewX: '45deg' }])`
|
||||
*/
|
||||
transform: ReactPropTypes.arrayOf(
|
||||
ReactPropTypes.oneOfType([
|
||||
ReactPropTypes.shape({perspective: ReactPropTypes.number}),
|
||||
|
@ -59,8 +75,13 @@ var TransformPropTypes = {
|
|||
])
|
||||
),
|
||||
|
||||
/* Deprecated */
|
||||
/**
|
||||
* Deprecated. Use the transform prop instead.
|
||||
*/
|
||||
transformMatrix: TransformMatrixPropType,
|
||||
/**
|
||||
* Deprecated. Use the transform prop instead.
|
||||
*/
|
||||
decomposedMatrix: DecomposedMatrixPropType,
|
||||
|
||||
/* Deprecated transform props used on Android only */
|
||||
|
|
Loading…
Reference in New Issue