From 6cc0eb8481e4cd5efea91af58c1b74a5f5949ebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Mon, 13 Jul 2020 13:46:10 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20bug:=20remove=20ConfigProvider?= =?UTF-8?q?=20(#555)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WrapContent.tsx | 49 +++++++++------------------------------------ 1 file changed, 10 insertions(+), 39 deletions(-) diff --git a/src/WrapContent.tsx b/src/WrapContent.tsx index 66399aa2..5d377741 100644 --- a/src/WrapContent.tsx +++ b/src/WrapContent.tsx @@ -1,48 +1,19 @@ import React, { CSSProperties } from 'react'; -import { ConfigProvider, Layout } from 'antd'; +import { Layout } from 'antd'; -const { Content } = Layout; - -class WrapContent extends React.Component<{ +const WrapContent: React.FC<{ isChildrenLayout?: boolean; className?: string; style?: CSSProperties; location?: any; - prefixCls?: string; contentHeight?: number | string; -}> { - ref: HTMLDivElement | null = null; - - render() { - const { - style, - prefixCls, - className, - children, - isChildrenLayout, - } = this.props; - return ( - - { - if (isChildrenLayout && this.ref) { - return this.ref; - } - return document.body; - }} - > -
{ - this.ref = ele; - }} - className={`${prefixCls}-basicLayout-children-content-wrap`} - > - {children} -
-
-
- ); - } -} +}> = (props) => { + const { style, className, children } = props; + return ( + + {children} + + ); +}; export default WrapContent;