mirror of
https://github.com/status-im/react-native.git
synced 2025-02-09 08:03:51 +00:00
Improve view props and style stuff.
Reviewed By: fkgozali Differential Revision: D5155884 fbshipit-source-id: defdcb7853cdb1c82466ee1dc451fc1b5d80782f
This commit is contained in:
parent
05e02b2dc5
commit
1f3140c496
@ -8,13 +8,23 @@
|
|||||||
*
|
*
|
||||||
* @providesModule ShadowPropTypesIOS
|
* @providesModule ShadowPropTypesIOS
|
||||||
* @flow
|
* @flow
|
||||||
|
* @format
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var ColorPropType = require('ColorPropType');
|
const ColorPropType = require('ColorPropType');
|
||||||
var ReactPropTypes = require('React').PropTypes;
|
const ReactPropTypes = require('prop-types');
|
||||||
|
|
||||||
var ShadowPropTypesIOS = {
|
/**
|
||||||
|
* These props can be used to dynamically generate shadows on views, images, text, etc.
|
||||||
|
*
|
||||||
|
* Because they are dynamically generated, they may cause performance regressions. Static
|
||||||
|
* shadow image asset may be a better way to go for optimal performance.
|
||||||
|
*
|
||||||
|
* These properties are iOS only - for similar functionality on Android, use the [`elevation`
|
||||||
|
* property](docs/viewstyleproptypes.html#elevation).
|
||||||
|
*/
|
||||||
|
const ShadowPropTypesIOS = {
|
||||||
/**
|
/**
|
||||||
* Sets the drop shadow color
|
* Sets the drop shadow color
|
||||||
* @platform ios
|
* @platform ios
|
||||||
@ -24,9 +34,10 @@ var ShadowPropTypesIOS = {
|
|||||||
* Sets the drop shadow offset
|
* Sets the drop shadow offset
|
||||||
* @platform ios
|
* @platform ios
|
||||||
*/
|
*/
|
||||||
shadowOffset: ReactPropTypes.shape(
|
shadowOffset: ReactPropTypes.shape({
|
||||||
{width: ReactPropTypes.number, height: ReactPropTypes.number}
|
width: ReactPropTypes.number,
|
||||||
),
|
height: ReactPropTypes.number,
|
||||||
|
}),
|
||||||
/**
|
/**
|
||||||
* Sets the drop shadow opacity (multiplied by the color's alpha component)
|
* Sets the drop shadow opacity (multiplied by the color's alpha component)
|
||||||
* @platform ios
|
* @platform ios
|
||||||
|
@ -90,18 +90,20 @@ const apis = [
|
|||||||
'../Libraries/Vibration/VibrationIOS.ios.js',
|
'../Libraries/Vibration/VibrationIOS.ios.js',
|
||||||
];
|
];
|
||||||
|
|
||||||
const stylesWithPermalink = [
|
|
||||||
'../Libraries/StyleSheet/LayoutPropTypes.js',
|
|
||||||
'../Libraries/StyleSheet/TransformPropTypes.js',
|
|
||||||
'../Libraries/Components/View/ShadowPropTypesIOS.js',
|
|
||||||
];
|
|
||||||
|
|
||||||
const stylesForEmbed = [
|
const stylesForEmbed = [
|
||||||
'../Libraries/Components/View/ViewStylePropTypes.js',
|
'../Libraries/Components/View/ViewStylePropTypes.js',
|
||||||
'../Libraries/Text/TextStylePropTypes.js',
|
'../Libraries/Text/TextStylePropTypes.js',
|
||||||
'../Libraries/Image/ImageStylePropTypes.js',
|
'../Libraries/Image/ImageStylePropTypes.js',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const stylesWithPermalink = [
|
||||||
|
'../Libraries/StyleSheet/LayoutPropTypes.js',
|
||||||
|
'../Libraries/StyleSheet/TransformPropTypes.js',
|
||||||
|
'../Libraries/Components/View/ShadowPropTypesIOS.js',
|
||||||
|
'../Libraries/Components/View/ViewPropTypes.js',
|
||||||
|
...stylesForEmbed,
|
||||||
|
];
|
||||||
|
|
||||||
const viewPropTypes = '../Libraries/Components/View/ViewPropTypes.js';
|
const viewPropTypes = '../Libraries/Components/View/ViewPropTypes.js';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user