Move some View style propTypes to InteractionPropTypes

This commit is contained in:
Nicolas Gallagher
2018-02-20 17:43:22 -08:00
parent 58bc18c2f5
commit b9f9a4f8d7
2 changed files with 33 additions and 16 deletions
@@ -11,6 +11,7 @@
import AnimationPropTypes from '../../modules/AnimationPropTypes';
import BorderPropTypes from '../../modules/BorderPropTypes';
import ColorPropType from '../ColorPropType';
import InteractionPropTypes from '../../modules/InteractionPropTypes';
import LayoutPropTypes from '../../modules/LayoutPropTypes';
import ShadowPropTypes from '../../modules/ShadowPropTypes';
import TransformPropTypes from '../../modules/TransformPropTypes';
@@ -21,6 +22,7 @@ const overscrollBehaviorType = oneOf(['auto', 'contain', 'none']);
const ViewStylePropTypes = {
...AnimationPropTypes,
...BorderPropTypes,
...InteractionPropTypes,
...LayoutPropTypes,
...ShadowPropTypes,
...TransformPropTypes,
@@ -43,28 +45,12 @@ const ViewStylePropTypes = {
backgroundSize: string,
boxShadow: string,
clip: string,
cursor: string,
filter: string,
outline: string,
outlineColor: ColorPropType,
overscrollBehavior: overscrollBehaviorType,
overscrollBehaviorX: overscrollBehaviorType,
overscrollBehaviorY: overscrollBehaviorType,
touchAction: oneOf([
'auto',
'inherit',
'manipulation',
'none',
'pan-down',
'pan-left',
'pan-right',
'pan-up',
'pan-x',
'pan-y',
'pinch-zoom'
]),
userSelect: string,
willChange: string,
WebkitMaskImage: string,
WebkitOverflowScrolling: oneOf(['auto', 'touch'])
};
@@ -0,0 +1,31 @@
/**
* Copyright (c) 2017-present, Nicolas Gallagher.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import { oneOf, string } from 'prop-types';
const InteractionPropTypes = {
cursor: string,
touchAction: oneOf([
'auto',
'inherit',
'manipulation',
'none',
'pan-down',
'pan-left',
'pan-right',
'pan-up',
'pan-x',
'pan-y',
'pinch-zoom'
]),
userSelect: string,
willChange: string
};
export default InteractionPropTypes;