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.

42 lines (34 loc) 1.09 kB
// @flow /* DOCUMENTATION: https://orbit.kiwi/components/modal/ */ 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 = "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, ...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;