@dengyongchao/modal
v1.1.1
Published
React UI Modal
Downloads
30
Readme
Modal
React based dialog box components, automatic center, adaptive size, support before and after open callback methods
Install
yarn add @dengyongchao/modal
Usage Modal
import Modal from "@dengyongchao/modal";
import "@dengyongchao/modal/modal.css";
API
| Property | Type | Default | Description | | :------------------ | ---------- | ------- | ------------------------------------------------------------ | | open | Boolean | false | Whether to open the dialog box | | close | Function | - | Close the triggered callback function | | loading | Boolean | true | Whether to display loading | | children | React Node | - | Used to confine a dialog box content area | | footer | React Node | - | Used at the bottom of the configuration dialog | | showMask | Boolean | true | Show the mask layer | | closeOnEsc | Boolean | true | Whether support press esc to close | | closeOnDcumentClick | Boolean | false | Support for clickable document closure | | showHeader | Boolean | true | Whether to display the title or not | | drapHeader | Boolean | true | Whether dragging is supported | | beforeOpen | Function | - | The callback function that fires before the dialog box opens | | beforeClose | Function | - | The callback function that fires before the dialog box closes |