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;