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.

40 lines (32 loc) 927 B
// @flow import type { Globals } from "../common/common.js.flow"; import ModalSection from "./ModalSection"; import ModalHeader from "./ModalHeader"; import ModalFooter from "./ModalFooter"; export type State = {| scrolled: boolean, loaded: boolean, fixedClose: boolean, fullyScrolled: boolean, |}; type Size = "small" | "normal" | "large"; type Children = | React$Element<typeof ModalHeader> | React$Element<typeof ModalSection> | React$Element<typeof ModalFooter>; type onClose = ( ev: SyntheticKeyboardEvent<HTMLDivElement> | SyntheticEvent<HTMLButtonElement> | MouseEvent, ) => void | Promise<any>; export type CloseElementType = { +onClose?: onClose, +closable?: boolean, }; export type Props = {| +size?: Size, +children: Array<Children> | Children, +closable?: boolean, +onClose?: onClose, +fixedFooter?: boolean, ...Globals, |}; declare export default React$ComponentType<Props>;