Browse Source

better typings for layout components

pull/6286/head
Panjie Setiawan Wicaksono 8 years ago
parent
commit
cc71ab957e
  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