import React from 'react'; import classNames from 'classnames'; export interface BasicProps { style?: React.CSSProperties; prefixCls?: string; className?: string; } function generator(props) { return (Basic) : any => { return class Adapter extends React.Component { static Header: any; static Footer: any; static Content: any; static Sider: any; render() { const { prefixCls } = props; return ; } }; }; } class Basic extends React.Component { render() { const { prefixCls, className, ...others } = this.props; const divCls = classNames(className, prefixCls); return (
); } } const Layout = generator({ prefixCls: 'ant-layout', })(Basic); const Header = generator({ prefixCls: 'ant-layout-header', })(Basic); const Footer = generator({ prefixCls: 'ant-layout-footer', })(Basic); const Content = generator({ prefixCls: 'ant-layout-content', })(Basic); Layout.Header = Header; Layout.Footer = Footer; Layout.Content = Content; export default Layout;