forked from floating-ui/react-popper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
react-popper.d.ts
63 lines (52 loc) · 1.47 KB
/
react-popper.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
declare module "react-popper" {
import * as React from "react";
import PopperJS from "popper.js";
interface IRestProps {
restProps: {
[prop: string]: any;
},
}
interface IComponentProps<T> {
children?: React.ReactNode | React.SFC<T & IRestProps>;
component?: React.ReactType;
innerRef?: (ref: HTMLElement) => void;
[prop: string]: any;
}
interface IManagerProps {
tag?: string | boolean;
[prop: string]: any;
}
class Manager extends React.Component<IManagerProps, {}> {
}
interface IPopperChildrenProps extends IRestProps {
popperProps: {
ref: (ref: HTMLElement) => void;
style: React.CSSProperties;
["data-placement"]: PopperJS.Placement;
};
restProps: IRestProps;
scheduleUpdate: (() => void) | undefined;
}
interface IPopperProps extends IComponentProps<IPopperChildrenProps> {
eventsEnabled?: boolean;
modifiers?: PopperJS.Modifiers;
placement?: PopperJS.Placement;
}
class Popper extends React.Component<IPopperProps, {}> {
}
interface ITargetChildrenProps extends IRestProps {
targetProps: {
ref: (ref: HTMLElement) => void;
}
}
class Target extends React.Component<IComponentProps<ITargetChildrenProps>, {}> {
}
interface IArrowChildrenProps extends IRestProps {
arrowProps: {
ref: (ref: HTMLElement) => void;
style: React.CSSProperties;
}
}
class Arrow extends React.Component<IComponentProps<IArrowChildrenProps>, {}> {
}
}