diff --git a/Libraries/Components/ScrollView/ScrollViewStickyHeader.js b/Libraries/Components/ScrollView/ScrollViewStickyHeader.js index da3f5037a90..a17d6350c65 100644 --- a/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +++ b/Libraries/Components/ScrollView/ScrollViewStickyHeader.js @@ -20,6 +20,8 @@ import Platform from '../../Utilities/Platform'; import type {LayoutEvent} from '../../Types/CoreEventTypes'; +import ScrollViewStickyHeaderInjection from './ScrollViewStickyHeaderInjection'; + const AnimatedView = AnimatedImplementation.createAnimatedComponent(View); export type Props = $ReadOnly<{ @@ -328,4 +330,8 @@ const styles = StyleSheet.create({ }, }); -module.exports = ScrollViewStickyHeader; +const SHToExport: React.AbstractComponent< + Props, + $ReadOnly<{setNextHeaderY: number => void, ...}>, +> = ScrollViewStickyHeaderInjection.unstable_SH ?? ScrollViewStickyHeader; +module.exports = SHToExport; diff --git a/Libraries/Components/ScrollView/ScrollViewStickyHeaderInjection.js b/Libraries/Components/ScrollView/ScrollViewStickyHeaderInjection.js new file mode 100644 index 00000000000..ab8684ffb68 --- /dev/null +++ b/Libraries/Components/ScrollView/ScrollViewStickyHeaderInjection.js @@ -0,0 +1,17 @@ +/** + * 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. + * + * @format + * @flow + */ + +'use strict'; + +import typeof ScrollViewStickyHeader from './ScrollViewStickyHeader'; + +export default { + unstable_SH: (null: ?ScrollViewStickyHeader), +};