-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ReactNative] Pull transform properties out into TransformPropTypes
- Loading branch information
Showing
3 changed files
with
32 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Copyright (c) 2015-present, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
* | ||
* @providesModule TransformPropTypes | ||
* @flow | ||
*/ | ||
'use strict'; | ||
|
||
var ReactPropTypes = require('ReactPropTypes'); | ||
|
||
var TransformPropTypes = { | ||
transform: ReactPropTypes.arrayOf(ReactPropTypes.object), | ||
transformMatrix: ReactPropTypes.arrayOf(ReactPropTypes.number), | ||
|
||
// DEPRECATED | ||
rotation: ReactPropTypes.number, | ||
scaleX: ReactPropTypes.number, | ||
scaleY: ReactPropTypes.number, | ||
translateX: ReactPropTypes.number, | ||
translateY: ReactPropTypes.number, | ||
}; | ||
|
||
module.exports = TransformPropTypes; |
d177a45
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit broke the docs :( Links to http://facebook.github.io/react-native/docs/transformproptypes.html#style which doesn't exist
d177a45
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 2f97551
d177a45
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, thanks for fixing this!
d177a45
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pzich - no problem 😄
d177a45
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Libraries/Components/View/ViewStylePropTypes.js should include
borderWidth: ReactPropTypes.number
, shouldn't it? I notice thatborderWidth
isn't listed in https://facebook.github.io/react-native/docs/view.html#styled177a45
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@premasagar that's included in the flexbox documentation because it affects layout
d177a45
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes. Thanks.
d177a45
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄 I can see why that might have caused some confusion though