Permalink
Browse files

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 #15261

Differential Revision: D5518925

Pulled By: hramos

fbshipit-source-id: 9aacf2c23e85573e150feb8c34e8bed54ad565d5
  • Loading branch information...
gwmccull authored and facebook-github-bot committed Jul 28, 2017
1 parent 278cd57 commit 404d74bd1e46e5cbf83fcd37ddd24f83a26c8ada
Showing with 22 additions and 1 deletion.
  1. +22 −1 Libraries/StyleSheet/TransformPropTypes.js
@@ -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 */

0 comments on commit 404d74b

Please sign in to comment.