react-native-screens-swiper
Version:
This lib. provide swiper view functionality with tab navigation on the top.
21 lines (19 loc) • 594 B
JSX
import React from 'react';
import {ScrollView} from 'react-native';
export default function Container({stickyHeaderEnabled, children, scrollableContainer, containerRef, stickyHeaderIndex, ...rest}) {
return(
scrollableContainer ? (
<ScrollView
ref={containerRef}
stickyHeaderIndices={stickyHeaderEnabled ? [stickyHeaderIndex] : null}
{...rest}
>
{children}
</ScrollView>
) : (
<>
{children}
</>
)
)
}