Skip to content

Commit

Permalink
🆙 fix for [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Jun 5, 2019
1 parent e93ceb6 commit 14dc252
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions components/config-provider/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import createReactContext, { Context } from '@ant-design/create-react-context';
import createReactContext from '@ant-design/create-react-context';

import defaultRenderEmpty, { RenderEmptyHandler } from './renderEmpty';

Expand Down Expand Up @@ -36,7 +36,7 @@ export interface ConfigProviderProps {
autoInsertSpaceInButton?: boolean;
}

const ConfigContext: Context<ConfigConsumerProps | null> = createReactContext({
const ConfigContext = createReactContext<ConfigConsumerProps>({
// We provide a default function for Context without provider
getPrefixCls: (suffixCls: string, customizePrefixCls?: string) => {
if (customizePrefixCls) return customizePrefixCls;
Expand Down
4 changes: 2 additions & 2 deletions components/drawer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as React from 'react';
import * as PropTypes from 'prop-types';
import RcDrawer from 'rc-drawer';
import createReactContext, { Context } from '@ant-design/create-react-context';
import createReactContext from '@ant-design/create-react-context';
import warning from '../_util/warning';
import classNames from 'classnames';
import Icon from '../icon';
import { withConfigConsumer, ConfigConsumerProps } from '../config-provider';
import { tuple } from '../_util/type';

const DrawerContext: Context<Drawer | null> = createReactContext(null);
const DrawerContext = createReactContext<Drawer | null>(null);

type EventType = React.MouseEvent<HTMLDivElement> | React.MouseEvent<HTMLButtonElement>;

Expand Down
4 changes: 2 additions & 2 deletions components/form/context.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import createReactContext, { Context } from '@ant-design/create-react-context';
import createReactContext from '@ant-design/create-react-context';
import { ColProps } from '../grid/col';
import { FormLabelAlign } from './FormItem';

Expand All @@ -10,7 +10,7 @@ export interface FormContextProps {
wrapperCol?: ColProps;
}

export const FormContext: Context<FormContextProps> = createReactContext({
export const FormContext = createReactContext<FormContextProps>({
labelAlign: 'right',
vertical: false,
});
4 changes: 2 additions & 2 deletions components/layout/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import classNames from 'classnames';
import createContext, { Context } from '@ant-design/create-react-context';
import createContext from '@ant-design/create-react-context';
import { SiderProps } from './Sider';
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';

Expand All @@ -19,7 +19,7 @@ export interface LayoutContextProps {
removeSider: (id: string) => void;
};
}
export const LayoutContext: Context<LayoutContextProps> = createContext({
export const LayoutContext = createContext<LayoutContextProps>({
siderHook: {
addSider: () => null,
removeSider: () => null,
Expand Down
4 changes: 2 additions & 2 deletions components/menu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import RcMenu, { Divider, ItemGroup } from 'rc-menu';
import createContext, { Context } from '@ant-design/create-react-context';
import createContext from '@ant-design/create-react-context';
import classNames from 'classnames';
import omit from 'omit.js';
import SubMenu from './SubMenu';
Expand Down Expand Up @@ -79,7 +79,7 @@ export interface MenuContextProps {
antdMenuTheme?: MenuTheme;
}

export const MenuContext: Context<MenuContextProps> = createContext({
export const MenuContext = createContext<MenuContextProps>({
inlineCollapsed: false,
});

Expand Down

0 comments on commit 14dc252

Please sign in to comment.