mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-05 11:19:34 +00:00
committed by
Nicolas Gallagher
parent
9d5a41c702
commit
b144992f51
@@ -7,24 +7,68 @@
|
|||||||
* @flow
|
* @flow
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { oneOf, string } from 'prop-types';
|
import { oneOf, oneOfType, string } from 'prop-types';
|
||||||
|
|
||||||
|
const cursorEnum = [
|
||||||
|
'auto',
|
||||||
|
'default',
|
||||||
|
'none',
|
||||||
|
'context-menu',
|
||||||
|
'help',
|
||||||
|
'pointer',
|
||||||
|
'progress',
|
||||||
|
'wait',
|
||||||
|
'cell',
|
||||||
|
'crosshair',
|
||||||
|
'text',
|
||||||
|
'vertical-text',
|
||||||
|
'alias',
|
||||||
|
'copy',
|
||||||
|
'move',
|
||||||
|
'no-drop',
|
||||||
|
'not-allowed',
|
||||||
|
'e-resize',
|
||||||
|
'n-resize',
|
||||||
|
'ne-resize',
|
||||||
|
'nw-resize',
|
||||||
|
's-resize',
|
||||||
|
'se-resize',
|
||||||
|
'sw-resize',
|
||||||
|
'w-resize',
|
||||||
|
'ew-resize',
|
||||||
|
'ns-resize',
|
||||||
|
'nesw-resize',
|
||||||
|
'nwse-resize',
|
||||||
|
'col-resize',
|
||||||
|
'row-resize',
|
||||||
|
'all-scroll',
|
||||||
|
'zoom-in',
|
||||||
|
'zoom-out',
|
||||||
|
'grab',
|
||||||
|
'grabbing '
|
||||||
|
];
|
||||||
|
const touchActionEnum = [
|
||||||
|
'auto',
|
||||||
|
'inherit',
|
||||||
|
'manipulation',
|
||||||
|
'none',
|
||||||
|
'pan-down',
|
||||||
|
'pan-left',
|
||||||
|
'pan-right',
|
||||||
|
'pan-up',
|
||||||
|
'pan-x',
|
||||||
|
'pan-y',
|
||||||
|
'pinch-zoom'
|
||||||
|
];
|
||||||
|
const userSelectEnum = ['auto', 'text', 'none', 'contain', 'all'];
|
||||||
|
|
||||||
const InteractionPropTypes = {
|
const InteractionPropTypes = {
|
||||||
cursor: string,
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Formal_syntax
|
||||||
touchAction: oneOf([
|
cursor: oneOfType([string, oneOf(cursorEnum)]),
|
||||||
'auto',
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action#Formal_syntax
|
||||||
'inherit',
|
touchAction: oneOf(touchActionEnum),
|
||||||
'manipulation',
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/user-select#Formal_syntax_2
|
||||||
'none',
|
userSelect: oneOf(userSelectEnum),
|
||||||
'pan-down',
|
|
||||||
'pan-left',
|
|
||||||
'pan-right',
|
|
||||||
'pan-up',
|
|
||||||
'pan-x',
|
|
||||||
'pan-y',
|
|
||||||
'pinch-zoom'
|
|
||||||
]),
|
|
||||||
userSelect: string,
|
|
||||||
willChange: string
|
willChange: string
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user