diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-05-30 01:53:55 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-05-30 02:21:14 +0800 |
commit | 338e8be327731116a4a0308ba353266293013dce (patch) | |
tree | 5924a9f8022f0dbc323b5d8fbbe10f7f5f8735a8 /packages/typescript-typings/types/react-popper/index.d.ts | |
parent | d4a366aeb13d8b3ea2ace86f5566ddf8d94bf9c2 (diff) | |
download | dexon-sol-tools-338e8be327731116a4a0308ba353266293013dce.tar dexon-sol-tools-338e8be327731116a4a0308ba353266293013dce.tar.gz dexon-sol-tools-338e8be327731116a4a0308ba353266293013dce.tar.bz2 dexon-sol-tools-338e8be327731116a4a0308ba353266293013dce.tar.lz dexon-sol-tools-338e8be327731116a4a0308ba353266293013dce.tar.xz dexon-sol-tools-338e8be327731116a4a0308ba353266293013dce.tar.zst dexon-sol-tools-338e8be327731116a4a0308ba353266293013dce.zip |
Add types for react-popper, remove types for react-joyride
Diffstat (limited to 'packages/typescript-typings/types/react-popper/index.d.ts')
-rw-r--r-- | packages/typescript-typings/types/react-popper/index.d.ts | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/packages/typescript-typings/types/react-popper/index.d.ts b/packages/typescript-typings/types/react-popper/index.d.ts index 4341c4521..d7dbca17f 100644 --- a/packages/typescript-typings/types/react-popper/index.d.ts +++ b/packages/typescript-typings/types/react-popper/index.d.ts @@ -1,4 +1,49 @@ // Type definitions for react-popper 1.0.0-beta.6 // Project: https://github.com/gilbarbara/react-joyride -declare module 'react-popper'; +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, {}> {} +} |