mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-10 09:12:46 +08:00
- [ReactNative] Use deprecated ix in TabBarExample | Amjad Masad - [ReactNative] Expanded license on obj-c files | Christopher Chedeau - [ReactNative] Expanded license on js files | Christopher Chedeau - [ReactNative] Fix React Devtools integration | Alex Kotliarskyi - [Text] Account for font leading so descenders are not clipped | James Ide - [ReactNative] Expanded license on js packager files | Christopher Chedeau - more UIExplorer flow | Basil Hosmer - [react-packager] Pick up package changes while running | Amjad Masad - Added a graph view and a ReactNative metric that displays current queue and execution time for the JS thread. | Bryce Redd - [ReactNative] Add NativeModules and DeviceEventEmitter to react-native exports | Alex Kotliarskyi
98 lines
2.6 KiB
JavaScript
98 lines
2.6 KiB
JavaScript
/**
|
|
* 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 LayoutPropTypes
|
|
*/
|
|
'use strict';
|
|
|
|
var ReactPropTypes = require('ReactPropTypes');
|
|
|
|
/**
|
|
* These properties are a subset of our styles that are consumed by the layout
|
|
* algorithm and affect the positioning and sizing of views.
|
|
*/
|
|
|
|
var LayoutPropTypes = {
|
|
width: ReactPropTypes.number,
|
|
height: ReactPropTypes.number,
|
|
top: ReactPropTypes.number,
|
|
left: ReactPropTypes.number,
|
|
right: ReactPropTypes.number,
|
|
bottom: ReactPropTypes.number,
|
|
margin: ReactPropTypes.number,
|
|
marginVertical: ReactPropTypes.number,
|
|
marginHorizontal: ReactPropTypes.number,
|
|
marginTop: ReactPropTypes.number,
|
|
marginBottom: ReactPropTypes.number,
|
|
marginLeft: ReactPropTypes.number,
|
|
marginRight: ReactPropTypes.number,
|
|
padding: ReactPropTypes.number,
|
|
paddingVertical: ReactPropTypes.number,
|
|
paddingHorizontal: ReactPropTypes.number,
|
|
paddingTop: ReactPropTypes.number,
|
|
paddingBottom: ReactPropTypes.number,
|
|
paddingLeft: ReactPropTypes.number,
|
|
paddingRight: ReactPropTypes.number,
|
|
borderWidth: ReactPropTypes.number,
|
|
borderTopWidth: ReactPropTypes.number,
|
|
borderRightWidth: ReactPropTypes.number,
|
|
borderBottomWidth: ReactPropTypes.number,
|
|
borderLeftWidth: ReactPropTypes.number,
|
|
|
|
position: ReactPropTypes.oneOf([
|
|
'absolute',
|
|
'relative'
|
|
]),
|
|
|
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction
|
|
flexDirection: ReactPropTypes.oneOf([
|
|
'row',
|
|
'column'
|
|
]),
|
|
|
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap
|
|
flexWrap: ReactPropTypes.oneOf([
|
|
'wrap',
|
|
'nowrap'
|
|
]),
|
|
|
|
// How to align children in the main direction
|
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content
|
|
justifyContent: ReactPropTypes.oneOf([
|
|
'flex-start',
|
|
'flex-end',
|
|
'center',
|
|
'space-between',
|
|
'space-around'
|
|
]),
|
|
|
|
// How to align children in the cross direction
|
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/align-items
|
|
alignItems: ReactPropTypes.oneOf([
|
|
'flex-start',
|
|
'flex-end',
|
|
'center',
|
|
'stretch'
|
|
]),
|
|
|
|
// How to align the element in the cross direction
|
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/align-items
|
|
alignSelf: ReactPropTypes.oneOf([
|
|
'auto',
|
|
'flex-start',
|
|
'flex-end',
|
|
'center',
|
|
'stretch'
|
|
]),
|
|
|
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/flex
|
|
flex: ReactPropTypes.number,
|
|
};
|
|
|
|
module.exports = LayoutPropTypes;
|