import React, {ComponentProps} from 'react';
import {BottomSheetBackdrop} from '@gorhom/bottom-sheet';

export interface BackDropProps
  extends ComponentProps<typeof BottomSheetBackdrop> {
  onPress?: () => void;
}

export function BackDrop({onPress, ...props}: BackDropProps) {
  return (
    <BottomSheetBackdrop
      {...props}
      appearsOnIndex={0}
      disappearsOnIndex={-1}
      opacity={0.6}
      onPress={onPress}
    />
  );
}
