mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-03-06 22:39:41 +08:00
@@ -13,12 +13,10 @@ type Props = ScrollViewProps & {
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
export default function DrawerContentScrollView({
|
||||
contentContainerStyle,
|
||||
style,
|
||||
children,
|
||||
...rest
|
||||
}: Props) {
|
||||
function DrawerContentScrollView(
|
||||
{ contentContainerStyle, style, children, ...rest }: Props,
|
||||
ref?: React.Ref<ScrollView>
|
||||
) {
|
||||
const drawerPosition = React.useContext(DrawerPositionContext);
|
||||
const insets = useSafeAreaInsets();
|
||||
|
||||
@@ -29,6 +27,7 @@ export default function DrawerContentScrollView({
|
||||
return (
|
||||
<ScrollView
|
||||
{...rest}
|
||||
ref={ref}
|
||||
contentContainerStyle={[
|
||||
{
|
||||
paddingTop: insets.top + 4,
|
||||
@@ -44,6 +43,8 @@ export default function DrawerContentScrollView({
|
||||
);
|
||||
}
|
||||
|
||||
export default React.forwardRef(DrawerContentScrollView);
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
|
||||
Reference in New Issue
Block a user