mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-04 13:08:41 +08:00
Merge pull request #6286 from panjiesw/layout-types
better typings for layout components
This commit is contained in:
commit
62f4e44ac6
@ -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…
Reference in New Issue
Block a user