Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

react-popper.d.ts 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import * as React from "react";
  2. import * as PopperJS from "popper.js";
  3. interface ManagerProps {
  4. children: React.ReactNode;
  5. }
  6. export class Manager extends React.Component<ManagerProps, {}> { }
  7. interface ReferenceChildrenProps {
  8. // React refs are supposed to be contravariant (allows a more general type to be passed rather than a more specific one)
  9. // However, Typescript currently can't infer that fact for refs
  10. // See https://github.com/microsoft/TypeScript/issues/30748 for more information
  11. ref: React.Ref<any>;
  12. }
  13. interface ReferenceProps {
  14. children: (props: ReferenceChildrenProps) => React.ReactNode;
  15. innerRef?: React.Ref<any>;
  16. }
  17. export class Reference extends React.Component<ReferenceProps, {}> { }
  18. export interface PopperArrowProps {
  19. ref: React.Ref<any>;
  20. style: React.CSSProperties;
  21. }
  22. export interface PopperChildrenProps {
  23. arrowProps: PopperArrowProps;
  24. outOfBoundaries: boolean | null;
  25. placement: PopperJS.Placement;
  26. ref: React.Ref<any>;
  27. scheduleUpdate: () => void;
  28. style: React.CSSProperties;
  29. }
  30. export interface PopperProps {
  31. children: (props: PopperChildrenProps) => React.ReactNode;
  32. eventsEnabled?: boolean;
  33. innerRef?: React.Ref<any>;
  34. modifiers?: PopperJS.Modifiers;
  35. placement?: PopperJS.Placement;
  36. positionFixed?: boolean;
  37. referenceElement?: PopperJS.ReferenceObject;
  38. }
  39. export class Popper extends React.Component<PopperProps, {}> { }