ant-design/components/layout/index.tsx
Dave d32a1fe274
fix(types): external module type error (CompoundedComponent) (#38666)
* fix(types): external module type error (CompoundedComponent)

* refactor(types): rename and replace internal CompoundedComponent type
2022-11-19 16:56:23 +08:00

24 lines
580 B
TypeScript

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