Skip to content

Commit

Permalink
chore(antd/next): improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Oct 21, 2021
1 parent c894adc commit 506eb12
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/antd/src/form-layout/index.tsx
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
4 changes: 1 addition & 3 deletions packages/antd/src/form-layout/useResponsiveFormLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const calculateProps: ICalculateProps = (target, props) => {
}
}

const useResponsiveFormLayout: IUseResponsiveFormLayout = (props) => {
export const useResponsiveFormLayout: IUseResponsiveFormLayout = (props) => {
const ref = useRef<HTMLDivElement>(null)
const { breakpoints } = props
if (!isArr(breakpoints)) {
Expand Down Expand Up @@ -104,5 +104,3 @@ const useResponsiveFormLayout: IUseResponsiveFormLayout = (props) => {
props: layoutProps,
}
}

export default useResponsiveFormLayout
2 changes: 1 addition & 1 deletion packages/next/src/form-layout/index.tsx
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
4 changes: 1 addition & 3 deletions packages/next/src/form-layout/useResponsiveFormLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const calculateProps: ICalculateProps = (target, props) => {
}
}

const useResponsiveFormLayout: IUseResponsiveFormLayout = (props) => {
export const useResponsiveFormLayout: IUseResponsiveFormLayout = (props) => {
const ref = useRef<HTMLDivElement>(null)
const { breakpoints } = props
if (!isArr(breakpoints)) {
Expand Down Expand Up @@ -104,5 +104,3 @@ const useResponsiveFormLayout: IUseResponsiveFormLayout = (props) => {
props: layoutProps,
}
}

export default useResponsiveFormLayout

0 comments on commit 506eb12

Please sign in to comment.