mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-30 01:16:24 +00:00
Move some View style propTypes to InteractionPropTypes
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
import AnimationPropTypes from '../../modules/AnimationPropTypes';
|
import AnimationPropTypes from '../../modules/AnimationPropTypes';
|
||||||
import BorderPropTypes from '../../modules/BorderPropTypes';
|
import BorderPropTypes from '../../modules/BorderPropTypes';
|
||||||
import ColorPropType from '../ColorPropType';
|
import ColorPropType from '../ColorPropType';
|
||||||
|
import InteractionPropTypes from '../../modules/InteractionPropTypes';
|
||||||
import LayoutPropTypes from '../../modules/LayoutPropTypes';
|
import LayoutPropTypes from '../../modules/LayoutPropTypes';
|
||||||
import ShadowPropTypes from '../../modules/ShadowPropTypes';
|
import ShadowPropTypes from '../../modules/ShadowPropTypes';
|
||||||
import TransformPropTypes from '../../modules/TransformPropTypes';
|
import TransformPropTypes from '../../modules/TransformPropTypes';
|
||||||
@@ -21,6 +22,7 @@ const overscrollBehaviorType = oneOf(['auto', 'contain', 'none']);
|
|||||||
const ViewStylePropTypes = {
|
const ViewStylePropTypes = {
|
||||||
...AnimationPropTypes,
|
...AnimationPropTypes,
|
||||||
...BorderPropTypes,
|
...BorderPropTypes,
|
||||||
|
...InteractionPropTypes,
|
||||||
...LayoutPropTypes,
|
...LayoutPropTypes,
|
||||||
...ShadowPropTypes,
|
...ShadowPropTypes,
|
||||||
...TransformPropTypes,
|
...TransformPropTypes,
|
||||||
@@ -43,28 +45,12 @@ const ViewStylePropTypes = {
|
|||||||
backgroundSize: string,
|
backgroundSize: string,
|
||||||
boxShadow: string,
|
boxShadow: string,
|
||||||
clip: string,
|
clip: string,
|
||||||
cursor: string,
|
|
||||||
filter: string,
|
filter: string,
|
||||||
outline: string,
|
outline: string,
|
||||||
outlineColor: ColorPropType,
|
outlineColor: ColorPropType,
|
||||||
overscrollBehavior: overscrollBehaviorType,
|
overscrollBehavior: overscrollBehaviorType,
|
||||||
overscrollBehaviorX: overscrollBehaviorType,
|
overscrollBehaviorX: overscrollBehaviorType,
|
||||||
overscrollBehaviorY: 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,
|
WebkitMaskImage: string,
|
||||||
WebkitOverflowScrolling: oneOf(['auto', 'touch'])
|
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;
|
||||||
Reference in New Issue
Block a user