Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 823cce2

Browse files
maclockardFezVrasta
authored andcommitted
feat: Export PopperChildrenProps and PopperArrowProps (#301)
Fixes #276 This makes the TS typings a bit easier to work with when not defining the children inline. I ran into this when using `React.useMemo` on the children, but I'm sure there are other use cases since someone else filed the issue.
1 parent e7da7fc commit 823cce2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

typings/react-popper.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ interface ReferenceProps {
1818
}
1919
export class Reference extends React.Component<ReferenceProps, {}> { }
2020

21-
interface PopperArrowProps {
21+
export interface PopperArrowProps {
2222
ref: RefHandler;
2323
style: React.CSSProperties;
2424
}
2525

26-
interface PopperChildrenProps {
26+
export interface PopperChildrenProps {
2727
arrowProps: PopperArrowProps;
2828
outOfBoundaries: boolean | null;
2929
placement: PopperJS.Placement;
@@ -32,7 +32,7 @@ interface PopperChildrenProps {
3232
style: React.CSSProperties;
3333
}
3434

35-
interface PopperProps {
35+
export interface PopperProps {
3636
children: (props: PopperChildrenProps) => React.ReactNode;
3737
eventsEnabled?: boolean;
3838
innerRef?: RefHandler;

0 commit comments

Comments
 (0)