Skip to content

Commit

Permalink
feat(antd/next): react-sticky-box upgraded to 1.x (#3125)
Browse files Browse the repository at this point in the history
  • Loading branch information
faner11 authored May 16, 2022
1 parent 99f669a commit 7847970
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 32 deletions.
2 changes: 1 addition & 1 deletion packages/antd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@formily/shared": "2.1.2",
"classnames": "^2.2.6",
"react-sortable-hoc": "^1.11.0",
"react-sticky-box": "^0.9.3"
"react-sticky-box": "^1.0.2"
},
"publishConfig": {
"access": "public"
Expand Down
14 changes: 2 additions & 12 deletions packages/antd/src/form-button-group/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,14 @@
* 4. 吸底布局
*/
import React, { useRef, useLayoutEffect, useState } from 'react'
import StickyBox, { StickyBoxMode } from 'react-sticky-box'
import StickyBox, { StickyBoxCompProps } from 'react-sticky-box'
import { ReactFC } from '@formily/react'
import { Space } from 'antd'
import { SpaceProps } from 'antd/lib/space'
import { BaseItem, IFormItemProps } from '../form-item'
import { usePrefixCls } from '../__builtins__'
import cls from 'classnames'
interface IStickyProps {
offsetTop?: number
offsetBottom?: number
bottom?: boolean
onChangeMode?: (
oldMode: StickyBoxMode | undefined,
newMode: StickyBoxMode
) => any
style?: React.CSSProperties
className?: string
padding?: number
interface IStickyProps extends StickyBoxCompProps {
align?: React.CSSProperties['textAlign']
}

Expand Down
2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@formily/shared": "2.1.2",
"classnames": "^2.2.6",
"react-sortable-hoc": "^1.11.0",
"react-sticky-box": "^0.9.3"
"react-sticky-box": "^1.0.2"
},
"publishConfig": {
"access": "public"
Expand Down
14 changes: 2 additions & 12 deletions packages/next/src/form-button-group/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,13 @@
* 4. 吸底布局
*/
import React, { useRef, useLayoutEffect, useState } from 'react'
import StickyBox, { StickyBoxMode } from 'react-sticky-box'
import StickyBox, { StickyBoxCompProps } from 'react-sticky-box'
import { ReactFC } from '@formily/react'
import { Space, ISpaceProps } from '../space'
import { BaseItem, IFormItemProps } from '../form-item'
import { usePrefixCls } from '../__builtins__'
import cls from 'classnames'
interface IStickyProps {
offsetTop?: number
offsetBottom?: number
bottom?: boolean
onChangeMode?: (
oldMode: StickyBoxMode | undefined,
newMode: StickyBoxMode
) => any
style?: React.CSSProperties
className?: string
padding?: number
interface IStickyProps extends StickyBoxCompProps {
align?: React.CSSProperties['textAlign']
}

Expand Down
11 changes: 5 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@
dependencies:
regenerator-runtime "^0.13.4"

"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.1.5", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.4", "@babel/runtime@^7.11.0", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.2.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.4", "@babel/runtime@^7.11.0", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.2.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
version "7.17.9"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.9.tgz#d19fbf802d01a8cb6cf053a64e472d42c434ba72"
integrity sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==
Expand Down Expand Up @@ -16868,12 +16868,11 @@ react-sortable-hoc@^1.11.0:
invariant "^2.2.4"
prop-types "^15.5.7"

react-sticky-box@^0.9.3:
version "0.9.3"
resolved "https://registry.yarnpkg.com/react-sticky-box/-/react-sticky-box-0.9.3.tgz#8450d4cef8e4fdd7b0351520365bc98c97da11af"
integrity sha512-Y/qO7vTqAvXuRR6G6ZCW4fX2Bz0GZRwiiLTVeZN5CVz9wzs37ev0Xj3KSKF/PzF0jifwATivI4t24qXG8rSz4Q==
react-sticky-box@^1.0.2:
version "1.0.2"
resolved "http://npm.indexed.cn/react-sticky-box/-/react-sticky-box-1.0.2.tgz#7e72a0f237bdf8270cec9254337f49519a411174"
integrity sha512-Kyvtppdtv1KqJyNU4DtrSMI0unyQRgtraZvVQ0GAazVbYiTsIVpyhpr+5R0Aavzu4uJNSe1awj2rk/qI7i6Zfw==
dependencies:
"@babel/runtime" "^7.1.5"
resize-observer-polyfill "^1.5.1"

react-test-renderer@^16.11.0:
Expand Down

0 comments on commit 7847970

Please sign in to comment.