Browse Source

Merge pull request #6286 from panjiesw/layout-types

better typings for layout components
pull/6291/head
偏右 8 years ago
committed by GitHub
parent
commit
62f4e44ac6
  1. 8
      components/layout/layout.tsx

8
components/layout/layout.tsx

@ -1,5 +1,6 @@
import React from 'react';
import classNames from 'classnames';
import { SiderProps } from './Sider';
export interface BasicProps {
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',
})(Basic);

Loading…
Cancel
Save