mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Convert ScrollViewStickyHeader to functional component and gate the change
Summary: Changelog: [Internal][Added] - Use injected ScrollViewStickyHeader if set Reviewed By: lunaleaps Differential Revision: D26931404 fbshipit-source-id: 6f6f1b501b610a05999898be3e2ce08aeb4dab1b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3b8fbc336c
commit
eacabe1398
@@ -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;
|
||||
|
||||
@@ -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),
|
||||
};
|
||||
Reference in New Issue
Block a user