UNPKG

@kiwicom/orbit-components

Version:

<div align="center"> <a href="https://orbit.kiwi" target="_blank"> <img alt="orbit-components" src="https://orbit.kiwi/wp-content/uploads/2018/08/orbit-components.png" srcset="https://orbit.kiwi/wp-content/uploads/2018/08/orbit-components@2x.png 2x"

39 lines (30 loc) 915 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, |}; 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, }; export type Props = {| +size?: Size, +children: Array<Children> | Children, +closable?: boolean, +onClose?: onClose, +fixedFooter?: boolean, ...Globals, |}; export type ContentType = { scrolled: boolean, ...Props }; declare export default React$ComponentType<Props>;