Skip to content

Commit

Permalink
Make RenderProp typing more generic (#221)
Browse files Browse the repository at this point in the history
like this also e.g. SVGElements can be used as target or element of a
tether component
  • Loading branch information
leabaertschi authored and danreeves committed Jan 13, 2020
1 parent 0549e22 commit 4486ada
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/react-tether.d.ts
Expand Up @@ -37,18 +37,18 @@ declare namespace ReactTether {
attachment: TetherAttachment;
targetAttachment: TetherAttachment;
};
type RenderProp = (ref: React.RefObject<HTMLElement>) => React.ReactNode;
type RenderProp = (ref: React.RefObject<Element>) => React.ReactNode;

type ContraintsTo = string | 'window' | 'scrollParent' | HTMLElement;

type Constraints = {
to?: ContraintsTo;
attachment?: string | 'together';
outOfBoundsClass?: string;
pinnedClass?: string;
pin?: boolean | string[];
};

interface TetherComponentProps
extends React.Props<TetherComponent>,
Tether.ITetherOptions {
Expand Down

0 comments on commit 4486ada

Please sign in to comment.