From cc71ab957e5ca37d3a1ac1b8aa1b74d67df192c3 Mon Sep 17 00:00:00 2001 From: Panjie Setiawan Wicaksono Date: Sun, 28 May 2017 02:20:05 +0700 Subject: [PATCH] better typings for layout components --- components/layout/layout.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/layout/layout.tsx b/components/layout/layout.tsx index 5f586ed27a..c345376fc6 100644 --- a/components/layout/layout.tsx +++ b/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 { } } -const Layout = generator({ +const Layout: React.ComponentClass & { + Header: React.ComponentClass; + Footer: React.ComponentClass; + Content: React.ComponentClass; + Sider: React.ComponentClass; +} = generator({ prefixCls: 'ant-layout', })(Basic);