ant-design/components/layout/index.tsx
dengqing 8cab1883af
fix: support Layout, Header and Footer given ref (#34650)
* feat: support layout components given refs

* test: add ensure given ref test case

* fix: update test

Co-authored-by: dengqing <qing.deng@goldenpig.com.cn>
2022-03-22 16:52:20 +08:00

24 lines
560 B
TypeScript

import InternalLayout, { Content, Footer, Header } from './layout';
import Sider from './Sider';
export { BasicProps as LayoutProps } from './layout';
export { SiderProps } from './Sider';
type InternalLayoutType = typeof InternalLayout;
interface LayoutType extends InternalLayoutType {
Header: typeof Header;
Footer: typeof Footer;
Content: typeof Content;
Sider: typeof Sider;
}
const Layout = InternalLayout as LayoutType;
Layout.Header = Header;
Layout.Footer = Footer;
Layout.Content = Content;
Layout.Sider = Sider;
export default Layout;