mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
8edd2e3ef6
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
23 lines
558 B
JavaScript
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});
|