From 977a5a1cc7b86565eb72e29213891ddd1ad52a53 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Wed, 24 May 2017 10:00:59 +0800 Subject: [PATCH] docs: add missing API docs for Modal, close: #6239 --- components/modal/Modal.tsx | 1 + components/modal/index.en-US.md | 1 + components/modal/index.zh-CN.md | 1 + 3 files changed, 3 insertions(+) diff --git a/components/modal/Modal.tsx b/components/modal/Modal.tsx index c178f97465..ed8e5cb2c9 100644 --- a/components/modal/Modal.tsx +++ b/components/modal/Modal.tsx @@ -36,6 +36,7 @@ export interface ModalProps { maskTransitionName?: string; transitionName?: string; className?: string; + getContainer?: (instance: React.ReactInstance) => HTMLElement; } export interface ModalContext { diff --git a/components/modal/index.en-US.md b/components/modal/index.en-US.md index 47a765fd18..8090e1c7d0 100644 --- a/components/modal/index.en-US.md +++ b/components/modal/index.en-US.md @@ -32,6 +32,7 @@ and so on. | style | Style of floating layer, typically used at least for adjusting the position. | object | - | | wrapClassName | The class name of the container of the modal dialog | string | - | | afterClose | Specify a function that will be called when modal is closed completely. | function | - | +| getContainer | Return the mount node for Modal | (instance): HTMLElement | () => document.body | #### Destroy on close diff --git a/components/modal/index.zh-CN.md b/components/modal/index.zh-CN.md index d8f4ff0753..88ec7f1f56 100644 --- a/components/modal/index.zh-CN.md +++ b/components/modal/index.zh-CN.md @@ -31,6 +31,7 @@ title: Modal | style | 可用于设置浮层的样式,调整浮层位置等 | object | - | | wrapClassName | 对话框外层容器的类名 | string | - | | afterClose | Modal 完全关闭后的回调 | function | 无 | +| getContainer | 指定 Modal 挂载的 HTML 节点 | (instance): HTMLElement | () => document.body | #### 清空旧数据