diff --git a/packages/antd/src/form-layout/index.tsx b/packages/antd/src/form-layout/index.tsx index b529a2e8b4f..95c5bc0e668 100644 --- a/packages/antd/src/form-layout/index.tsx +++ b/packages/antd/src/form-layout/index.tsx @@ -1,5 +1,5 @@ import React, { createContext, useContext } from 'react' -import useResponsiveFormLayout from './useResponsiveFormLayout' +import { useResponsiveFormLayout } from './useResponsiveFormLayout' import { usePrefixCls } from '../__builtins__' import cls from 'classnames' diff --git a/packages/antd/src/form-layout/useResponsiveFormLayout.ts b/packages/antd/src/form-layout/useResponsiveFormLayout.ts index 26fc838c760..ffbc8ae2053 100644 --- a/packages/antd/src/form-layout/useResponsiveFormLayout.ts +++ b/packages/antd/src/form-layout/useResponsiveFormLayout.ts @@ -73,7 +73,7 @@ const calculateProps: ICalculateProps = (target, props) => { } } -const useResponsiveFormLayout: IUseResponsiveFormLayout = (props) => { +export const useResponsiveFormLayout: IUseResponsiveFormLayout = (props) => { const ref = useRef(null) const { breakpoints } = props if (!isArr(breakpoints)) { @@ -104,5 +104,3 @@ const useResponsiveFormLayout: IUseResponsiveFormLayout = (props) => { props: layoutProps, } } - -export default useResponsiveFormLayout diff --git a/packages/next/src/form-layout/index.tsx b/packages/next/src/form-layout/index.tsx index 8d1a33cce78..d72adcf39a8 100644 --- a/packages/next/src/form-layout/index.tsx +++ b/packages/next/src/form-layout/index.tsx @@ -1,5 +1,5 @@ import React, { createContext, useContext } from 'react' -import useResponsiveFormLayout from './useResponsiveFormLayout' +import { useResponsiveFormLayout } from './useResponsiveFormLayout' import { usePrefixCls } from '../__builtins__' import cls from 'classnames' diff --git a/packages/next/src/form-layout/useResponsiveFormLayout.ts b/packages/next/src/form-layout/useResponsiveFormLayout.ts index 26fc838c760..ffbc8ae2053 100644 --- a/packages/next/src/form-layout/useResponsiveFormLayout.ts +++ b/packages/next/src/form-layout/useResponsiveFormLayout.ts @@ -73,7 +73,7 @@ const calculateProps: ICalculateProps = (target, props) => { } } -const useResponsiveFormLayout: IUseResponsiveFormLayout = (props) => { +export const useResponsiveFormLayout: IUseResponsiveFormLayout = (props) => { const ref = useRef(null) const { breakpoints } = props if (!isArr(breakpoints)) { @@ -104,5 +104,3 @@ const useResponsiveFormLayout: IUseResponsiveFormLayout = (props) => { props: layoutProps, } } - -export default useResponsiveFormLayout