From 280f907297137b468ac7e3217b53bf74962db237 Mon Sep 17 00:00:00 2001 From: Zach Guo Date: Sat, 31 Mar 2018 10:15:42 -0700 Subject: [PATCH] Fix Layout.Sider typos (#9885) --- components/layout/Sider.tsx | 6 +++--- components/menu/index.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/layout/Sider.tsx b/components/layout/Sider.tsx index e8cbf777fa..835b587c73 100644 --- a/components/layout/Sider.tsx +++ b/components/layout/Sider.tsx @@ -44,13 +44,13 @@ export interface SiderProps extends React.HTMLAttributes { breakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'; } -export interface SliderState { +export interface SiderState { collapsed?: boolean; below: boolean; belowShow?: boolean; } -export interface SliderContext { +export interface SiderContext { siderCollapsed: boolean; } @@ -62,7 +62,7 @@ const generateId = (() => { }; })(); -export default class Sider extends React.Component { +export default class Sider extends React.Component { static __ANT_LAYOUT_SIDER: any = true; static defaultProps = { diff --git a/components/menu/index.tsx b/components/menu/index.tsx index 5e61f902b8..0f32a7907b 100644 --- a/components/menu/index.tsx +++ b/components/menu/index.tsx @@ -7,7 +7,7 @@ import animation from '../_util/openAnimation'; import warning from '../_util/warning'; import SubMenu from './SubMenu'; import Item from './MenuItem'; -import { SliderContext } from '../layout/Sider'; +import { SiderContext } from '../layout/Sider'; export interface SelectParam { key: string; @@ -107,7 +107,7 @@ export default class Menu extends React.Component { antdMenuTheme: this.props.theme, }; } - componentWillReceiveProps(nextProps: MenuProps, nextContext: SliderContext) { + componentWillReceiveProps(nextProps: MenuProps, nextContext: SiderContext) { const { prefixCls } = this.props; if (this.props.mode === 'inline' && nextProps.mode !== 'inline') {