Fix Layout.Sider typos (#9885)

pull/9890/head
Zach Guo 7 years ago committed by 偏右
parent 53abf888cb
commit 280f907297

@ -44,13 +44,13 @@ export interface SiderProps extends React.HTMLAttributes<HTMLDivElement> {
breakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'; breakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
} }
export interface SliderState { export interface SiderState {
collapsed?: boolean; collapsed?: boolean;
below: boolean; below: boolean;
belowShow?: boolean; belowShow?: boolean;
} }
export interface SliderContext { export interface SiderContext {
siderCollapsed: boolean; siderCollapsed: boolean;
} }
@ -62,7 +62,7 @@ const generateId = (() => {
}; };
})(); })();
export default class Sider extends React.Component<SiderProps, SliderState> { export default class Sider extends React.Component<SiderProps, SiderState> {
static __ANT_LAYOUT_SIDER: any = true; static __ANT_LAYOUT_SIDER: any = true;
static defaultProps = { static defaultProps = {

@ -7,7 +7,7 @@ import animation from '../_util/openAnimation';
import warning from '../_util/warning'; import warning from '../_util/warning';
import SubMenu from './SubMenu'; import SubMenu from './SubMenu';
import Item from './MenuItem'; import Item from './MenuItem';
import { SliderContext } from '../layout/Sider'; import { SiderContext } from '../layout/Sider';
export interface SelectParam { export interface SelectParam {
key: string; key: string;
@ -107,7 +107,7 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
antdMenuTheme: this.props.theme, antdMenuTheme: this.props.theme,
}; };
} }
componentWillReceiveProps(nextProps: MenuProps, nextContext: SliderContext) { componentWillReceiveProps(nextProps: MenuProps, nextContext: SiderContext) {
const { prefixCls } = this.props; const { prefixCls } = this.props;
if (this.props.mode === 'inline' && if (this.props.mode === 'inline' &&
nextProps.mode !== 'inline') { nextProps.mode !== 'inline') {

Loading…
Cancel
Save