diff options
author | Hsuan Lee <boczeratul@gmail.com> | 2019-03-06 15:01:12 +0800 |
---|---|---|
committer | Hsuan Lee <boczeratul@gmail.com> | 2019-03-06 15:01:12 +0800 |
commit | c5a9c90c0b6dbeb59eb4d8bb6ad20a1afdc2450f (patch) | |
tree | e925fdefbe35304b71e57c09c89fd6d123c3ab40 /packages/typescript-typings/types/react-popper/index.d.ts | |
parent | 69dc8110f4be576fe91d28a653906fd67904a899 (diff) | |
download | dexon-sol-tools-c5a9c90c0b6dbeb59eb4d8bb6ad20a1afdc2450f.tar dexon-sol-tools-c5a9c90c0b6dbeb59eb4d8bb6ad20a1afdc2450f.tar.gz dexon-sol-tools-c5a9c90c0b6dbeb59eb4d8bb6ad20a1afdc2450f.tar.bz2 dexon-sol-tools-c5a9c90c0b6dbeb59eb4d8bb6ad20a1afdc2450f.tar.lz dexon-sol-tools-c5a9c90c0b6dbeb59eb4d8bb6ad20a1afdc2450f.tar.xz dexon-sol-tools-c5a9c90c0b6dbeb59eb4d8bb6ad20a1afdc2450f.tar.zst dexon-sol-tools-c5a9c90c0b6dbeb59eb4d8bb6ad20a1afdc2450f.zip |
Add typescript definitions
Diffstat (limited to 'packages/typescript-typings/types/react-popper/index.d.ts')
-rw-r--r-- | packages/typescript-typings/types/react-popper/index.d.ts | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/packages/typescript-typings/types/react-popper/index.d.ts b/packages/typescript-typings/types/react-popper/index.d.ts new file mode 100644 index 000000000..d7dbca17f --- /dev/null +++ b/packages/typescript-typings/types/react-popper/index.d.ts @@ -0,0 +1,49 @@ +// Type definitions for react-popper 1.0.0-beta.6 +// Project: https://github.com/gilbarbara/react-joyride + +declare module 'react-popper' { + import * as React from 'react'; + import * as PopperJS from 'popper.js'; + + interface ManagerProps { + children: React.ReactNode; + } + export class Manager extends React.Component<ManagerProps, {}> {} + + type RefHandler = (ref: HTMLElement | null) => void; + + export interface ReferenceChildrenProps { + ref: RefHandler; + } + + export interface ReferenceProps { + children: (props: ReferenceChildrenProps) => React.ReactNode; + } + export class Reference extends React.Component<ReferenceProps, {}> {} + + export interface PopperArrowProps { + ref: RefHandler; + style: React.CSSProperties; + } + + export type Placement = PopperJS.Placement; + + export interface PopperChildrenProps { + arrowProps: PopperArrowProps; + outOfBoundaries: boolean | null; + placement: PopperJS.Placement; + ref: RefHandler; + scheduleUpdate: () => void; + style: React.CSSProperties; + } + + export interface PopperProps { + children: (props: PopperChildrenProps) => React.ReactNode; + eventsEnabled?: boolean; + modifiers?: PopperJS.Modifiers; + placement?: PopperJS.Placement; + positionFixed?: boolean; + referenceElement?: Element; + } + export class Popper extends React.Component<PopperProps, {}> {} +} |