Files
react-native/Libraries/Components/ScrollView/ScrollViewContext.js
T
Tim Yung 8edd2e3ef6 RN: Extract ScrollViewContext
Summary:
Extracts `ScrollViewContext` so that other components can use it without requiring `ScrollView` as a dependency.

Changelog:
[Internal]

Reviewed By: kacieb

Differential Revision: D22670035

fbshipit-source-id: 7f902697ad2a60cd1869438e9a2b77e479a18065
2020-08-24 15:24:49 -07:00

23 lines
558 B
JavaScript

/**
* Copyright (c) Facebook, Inc. and its 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
* @format
*/
'use strict';
import * as React from 'react';
type Value = {horizontal: boolean} | null;
const ScrollViewContext: React.Context<Value> = React.createContext(null);
export default ScrollViewContext;
export const HORIZONTAL: Value = Object.freeze({horizontal: true});
export const VERTICAL: Value = Object.freeze({horizontal: false});