Merge pull request #6286 from panjiesw/layout-types

better typings for layout components
This commit is contained in:
偏右 2017-05-28 12:59:01 +08:00 committed by GitHub
commit 62f4e44ac6

View File

@ -1,5 +1,6 @@
import React from 'react'; import React from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import { SiderProps } from './Sider';
export interface BasicProps { export interface BasicProps {
style?: React.CSSProperties; style?: React.CSSProperties;
@ -40,7 +41,12 @@ class Basic extends React.Component<BasicProps, any> {
} }
} }
const Layout = generator({ const Layout: React.ComponentClass<BasicProps> & {
Header: React.ComponentClass<BasicProps>;
Footer: React.ComponentClass<BasicProps>;
Content: React.ComponentClass<BasicProps>;
Sider: React.ComponentClass<SiderProps>;
} = generator({
prefixCls: 'ant-layout', prefixCls: 'ant-layout',
})(Basic); })(Basic);