ant-design/components/layout/index.ts
Peach 9078b2b211
feat: export sider context from layout (#45916)
* feat: export sider context from layout

* refactor: use internal naming
2023-11-17 10:44:56 +08:00

27 lines
756 B
TypeScript

import InternalLayout, { Content, Footer, Header } from './layout';
import Sider, { SiderContext } 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;
/** @private Internal Context. Do not use in your production. */
_InternalSiderContext: typeof SiderContext;
};
const Layout = InternalLayout as CompoundedComponent;
Layout.Header = Header;
Layout.Footer = Footer;
Layout.Content = Content;
Layout.Sider = Sider;
Layout._InternalSiderContext = SiderContext;
export default Layout;