UNPKG

@kiwicom/orbit-components

Version:

Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.

46 lines (37 loc) 1.2 kB
// @flow /* DOCUMENTATION: https://orbit.kiwi/components/modal/ */ import * as React from "react"; import type { Globals } from "../common/common.js.flow"; import typeof ModalSectionType from "./ModalSection"; import typeof ModalHeaderType from "./ModalHeader"; import typeof ModalFooterType from "./ModalFooter"; export type State = {| scrolled: boolean, loaded: boolean, fixedClose: boolean, fullyScrolled: boolean, modalWidth: number, footerHeight: number, hasModalSection: boolean, |}; type Size = "extraSmall" | "small" | "normal" | "large"; export type onClose = ( ev: SyntheticKeyboardEvent<HTMLDivElement> | SyntheticEvent<HTMLButtonElement> | MouseEvent, ) => void | Promise<any>; export type Props = {| +size?: Size, +children: React.Node, +onClose?: onClose, +fixedFooter?: boolean, +isMobileFullPage?: boolean, +preventOverlayClose?: boolean, +hasCloseButton?: boolean, ...Globals, |}; declare export default React.ComponentType<Props>; declare export var PureModal: React.ComponentType<Props>; declare export var ModalHeader: ModalHeaderType; declare export var ModalSection: ModalSectionType; declare export var ModalFooter: ModalFooterType;