SteffeyDev / react-native-popover-view

A well-tested, adaptable, lightweight <Popover> component for react-native
MIT License
613 stars 92 forks source link

`Point` should be exported from the package #154

Open luixo opened 1 year ago

luixo commented 1 year ago

Describe the bug I have a thin wrapper around Popover that adds <Touchable /> for children that don't have it by default. For that I need to check from prop on being a Rect / Point / function etc.

// getFrom function
if ( ... ||
  props.from instanceof Rect ||
  props.from instanceof Point
) {
  return props.from;
}
return <Touchable>{props.from}</Touchable>

But to check from on being Point I need that class exported from the package and it is currently not. I have to import it manually from one of the files: import { Point } from "react-native-popover-view/dist/Types"; I believe it should be reexported in react-native-popover-view/dist/index.d.ts file.