Fix Layout.Sider typos (#9885)

This commit is contained in:
Zach Guo 2018-03-31 10:15:42 -07:00 committed by 偏右
parent 53abf888cb
commit 280f907297
2 changed files with 5 additions and 5 deletions

View File

@ -44,13 +44,13 @@ export interface SiderProps extends React.HTMLAttributes<HTMLDivElement> {
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<SiderProps, SliderState> {
export default class Sider extends React.Component<SiderProps, SiderState> {
static __ANT_LAYOUT_SIDER: any = true;
static defaultProps = {

View File

@ -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<MenuProps, MenuState> {
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') {