@aliretail/react-materials-components
Version:
40 lines (39 loc) • 1.57 kB
TypeScript
import * as React from 'react';
import { ComponentArea } from '../factory';
import { SectionProps } from '../components/Section';
import { IFooterProps } from '../components/Footer';
import { IPreserveProps } from '../components/Preserve';
import { INavProps } from '../components/Nav';
import { ILeftProps } from '../components/Left';
import { IContainerProps } from '../components/Container';
interface PageLayoutProps {
mode?: 'normal' | 'fillInScreen' | 'leftFixed' | 'fixed';
horizontalDivider?: 'space' | 'line';
containerClassName?: string;
style?: React.CSSProperties;
isStrictMode?: boolean;
leftSize?: 'small' | 'medium' | 'large';
leftWidth?: number;
getNonStrictArea?: (el: React.ReactElement) => ComponentArea | '';
}
declare type RenderContent = {
[name in ComponentArea]: React.ReactElement[];
};
export default class PageLayout extends React.Component<PageLayoutProps> {
static Section: (props: SectionProps) => JSX.Element;
static Preserve: (props: IPreserveProps) => JSX.Element;
static Footer: (props: IFooterProps) => JSX.Element;
static Nav: (props: INavProps) => JSX.Element;
static Left: (props: ILeftProps) => JSX.Element;
static Container: (props: IContainerProps) => JSX.Element;
static defaultProps: PageLayoutProps;
container: HTMLDivElement;
componentDidMount(): void;
getRenderContent: () => RenderContent;
/**
* 判断是否需要将 container 至少占满屏幕
*/
isSetContainerFull(content: any): boolean;
render(): JSX.Element;
}
export {};