Skip to content

Commit

Permalink
[Popper] Update TypeScript definitions (#12161)
Browse files Browse the repository at this point in the history
* Update Popper.d.ts

* Update Popper.d.ts
  • Loading branch information
Slessi authored and oliviertassinari committed Jul 16, 2018
1 parent 7562658 commit c4dfc4a
Showing 1 changed file with 24 additions and 15 deletions.
39 changes: 24 additions & 15 deletions packages/material-ui/src/Popper/Popper.d.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
import * as React from 'react';
import { PortalProps } from '../Portal';
import { TransitionProps } from '../transitions/transition';

export type PopperPlacementType =
| 'bottom-end'
| 'bottom-start'
| 'bottom'
| 'left-end'
| 'left-start'
| 'left'
| 'right-end'
| 'right-start'
| 'right'
| 'top-end'
| 'top-start'
| 'top';

export interface PopperProps extends React.HTMLAttributes<HTMLDivElement> {
anchorEl?: HTMLElement | ((element: HTMLElement) => HTMLElement);
children: () => React.ReactElement<any> | React.ReactElement<any>;
transition?: boolean;
anchorEl?: null | HTMLElement | ((element: HTMLElement) => HTMLElement);
children: (
props: {
placement: PopperPlacementType;
TransitionProps?: TransitionProps;
},
) => React.ReactElement<any>;
container?: PortalProps['container'];
disablePortal?: PortalProps['disablePortal'];
keepMounted?: boolean;
modifiers?: Object;
open: boolean;
placement?:
| 'bottom-end'
| 'bottom-start'
| 'bottom'
| 'left-end'
| 'left-start'
| 'left'
| 'right-end'
| 'right-start'
| 'right'
| 'top-end'
| 'top-start'
| 'top';
placement?: PopperPlacementType;
popperOptions?: Object;
}

Expand Down

0 comments on commit c4dfc4a

Please sign in to comment.