mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
32c704c30f
Summary: Changelog: [Internal] - Add gated option to use w3c pointer events for Pressibility's hover callbacks Reviewed By: p-sun Differential Revision: D35596600 fbshipit-source-id: f9e4b71497efd0dbb09dbc1872694fc93a6e1f2e
40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow strict-local
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
export type FeatureFlags = {|
|
|
/**
|
|
* Function used to enable / disabled Layout Animations in React Native.
|
|
* Default value = true.
|
|
*/
|
|
isLayoutAnimationEnabled: () => boolean,
|
|
/**
|
|
* Function used to enable / disable W3C pointer event emitting in React Native.
|
|
* If enabled you must also flip the equivalent native flags on each platform:
|
|
* iOS -> RCTSetDispatchW3CPointerEvents
|
|
* Android -> ReactFeatureFlags.dispatchPointerEvents
|
|
*/
|
|
shouldEmitW3CPointerEvents: () => boolean,
|
|
/**
|
|
* Function used to enable / disable Pressibility from using W3C Pointer Events
|
|
* for its hover callbacks
|
|
*/
|
|
shouldPressibilityUseW3CPointerEventsForHover: () => boolean,
|
|
|};
|
|
|
|
const ReactNativeFeatureFlags: FeatureFlags = {
|
|
isLayoutAnimationEnabled: () => true,
|
|
shouldEmitW3CPointerEvents: () => false,
|
|
shouldPressibilityUseW3CPointerEventsForHover: () => false,
|
|
};
|
|
|
|
module.exports = ReactNativeFeatureFlags;
|