diff --git a/components/modal/Modal.tsx b/components/modal/Modal.tsx index 048e370fb..2b39489b5 100644 --- a/components/modal/Modal.tsx +++ b/components/modal/Modal.tsx @@ -19,7 +19,7 @@ const maxHeight = StyleSheet.create({ export interface ModalProps extends ModalPropsType, - WithThemeStyles { + WithThemeStyles { style?: StyleProp; bodyStyle?: StyleProp; } @@ -32,16 +32,16 @@ class AntmModal extends React.Component { style: {}, bodyStyle: {}, animationType: 'fade', - onClose() {}, + onClose() { }, footer: [], transparent: false, popup: false, animateAppear: true, operation: false, }; - static alert = alert; - static operation = operation; - static prompt = prompt; + static alert: typeof alert; + static operation: typeof operation; + static prompt: typeof prompt; static contextTypes = { antLocale: PropTypes.object, diff --git a/components/modal/index.tsx b/components/modal/index.tsx index 8144af51b..f2e5e6b23 100644 --- a/components/modal/index.tsx +++ b/components/modal/index.tsx @@ -1,3 +1,10 @@ import Modal from './Modal'; +import alert from './alert'; +import prompt from './prompt'; +import operation from './operation'; + +Modal.alert = alert; +Modal.prompt = prompt; +Modal.operation = operation; export default Modal;