From 27f22a1541e3a0ce783dbb1f6829666010d8929c Mon Sep 17 00:00:00 2001 From: saseungmin Date: Fri, 28 Jul 2023 22:16:37 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20update=20@nft-team/react=20=EB=AC=B8?= =?UTF-8?q?=EC=84=9C=20=EB=B0=8F=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/silver-years-exercise.md | 5 -- apps/docs/docs/core/modules.md | 14 ++--- apps/docs/docs/react/modules/components.md | 6 +- apps/docs/docs/react/modules/hooks.md | 72 ++++++++++++++++++++-- packages/react/CHANGELOG.md | 6 ++ packages/react/package.json | 2 +- 6 files changed, 83 insertions(+), 22 deletions(-) delete mode 100644 .changeset/silver-years-exercise.md diff --git a/.changeset/silver-years-exercise.md b/.changeset/silver-years-exercise.md deleted file mode 100644 index 69f246a7..00000000 --- a/.changeset/silver-years-exercise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nft-team/react": minor ---- - -feat(@nft-team/react): useLessThenScrollY, useThrottleCallback hook 적용 diff --git a/apps/docs/docs/core/modules.md b/apps/docs/docs/core/modules.md index c547a5a7..4fbaf60e 100644 --- a/apps/docs/docs/core/modules.md +++ b/apps/docs/docs/core/modules.md @@ -30,7 +30,7 @@ custom_edit_url: null #### Defined in -[utils.ts:44](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/core/src/utils.ts#L44) +[utils.ts:44](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/core/src/utils.ts#L44) ___ @@ -50,7 +50,7 @@ ___ #### Defined in -[utils.ts:26](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/core/src/utils.ts#L26) +[utils.ts:26](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/core/src/utils.ts#L26) ___ @@ -71,7 +71,7 @@ ___ #### Defined in -[utils.ts:34](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/core/src/utils.ts#L34) +[utils.ts:34](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/core/src/utils.ts#L34) ___ @@ -91,7 +91,7 @@ ___ #### Defined in -[utils.ts:64](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/core/src/utils.ts#L64) +[utils.ts:64](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/core/src/utils.ts#L64) ___ @@ -117,7 +117,7 @@ ___ #### Defined in -[utils.ts:52](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/core/src/utils.ts#L52) +[utils.ts:52](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/core/src/utils.ts#L52) ___ @@ -153,7 +153,7 @@ console.log(result); // 'newValue'; #### Defined in -[utils.ts:14](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/core/src/utils.ts#L14) +[utils.ts:14](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/core/src/utils.ts#L14) ___ @@ -173,4 +173,4 @@ ___ #### Defined in -[utils.ts:36](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/core/src/utils.ts#L36) +[utils.ts:36](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/core/src/utils.ts#L36) diff --git a/apps/docs/docs/react/modules/components.md b/apps/docs/docs/react/modules/components.md index a4879830..fdf51aff 100644 --- a/apps/docs/docs/react/modules/components.md +++ b/apps/docs/docs/react/modules/components.md @@ -45,7 +45,7 @@ function ClintOnlyComponent() { #### Defined in -[packages/react/src/components/ClientOnly.tsx:23](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/react/src/components/ClientOnly.tsx#L23) +[packages/react/src/components/ClientOnly.tsx:23](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/react/src/components/ClientOnly.tsx#L23) ___ @@ -65,7 +65,7 @@ ___ #### Defined in -[packages/react/src/components/DelayRenderComponent.tsx:11](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/react/src/components/DelayRenderComponent.tsx#L11) +[packages/react/src/components/DelayRenderComponent.tsx:11](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/react/src/components/DelayRenderComponent.tsx#L11) ___ @@ -85,4 +85,4 @@ ___ #### Defined in -[packages/react/src/components/GlobalPortal.tsx:10](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/react/src/components/GlobalPortal.tsx#L10) +[packages/react/src/components/GlobalPortal.tsx:10](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/react/src/components/GlobalPortal.tsx#L10) diff --git a/apps/docs/docs/react/modules/hooks.md b/apps/docs/docs/react/modules/hooks.md index ef7febaf..dc2b6187 100644 --- a/apps/docs/docs/react/modules/hooks.md +++ b/apps/docs/docs/react/modules/hooks.md @@ -32,7 +32,7 @@ custom_edit_url: null #### Defined in -[packages/react/src/hooks/useActionKeyEvent.ts:6](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/react/src/hooks/useActionKeyEvent.ts#L6) +[packages/react/src/hooks/useActionKeyEvent.ts:6](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/react/src/hooks/useActionKeyEvent.ts#L6) ___ @@ -52,7 +52,7 @@ ___ #### Defined in -[packages/react/src/hooks/useBoolean.ts:3](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/react/src/hooks/useBoolean.ts#L3) +[packages/react/src/hooks/useBoolean.ts:3](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/react/src/hooks/useBoolean.ts#L3) ___ @@ -79,7 +79,7 @@ ___ #### Defined in -[packages/react/src/hooks/useDebounce.ts:3](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/react/src/hooks/useDebounce.ts#L3) +[packages/react/src/hooks/useDebounce.ts:3](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/react/src/hooks/useDebounce.ts#L3) ___ @@ -111,7 +111,7 @@ useEffect(() => { #### Defined in -[packages/react/src/hooks/useIsMounted.ts:18](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/react/src/hooks/useIsMounted.ts#L18) +[packages/react/src/hooks/useIsMounted.ts:18](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/react/src/hooks/useIsMounted.ts#L18) ___ @@ -146,6 +146,27 @@ node_modules/@types/react/ts5.0/index.d.ts:1064 ___ +### useLessThenScrollY + +▸ **useLessThenScrollY**(`targetScrollY?`, `delay?`): `boolean` + +#### Parameters + +| Name | Type | Default value | +| :------ | :------ | :------ | +| `targetScrollY` | `number` | `0` | +| `delay` | `number` | `200` | + +#### Returns + +`boolean` + +#### Defined in + +[packages/react/src/hooks/useLessThenScrollY.ts:5](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/react/src/hooks/useLessThenScrollY.ts#L5) + +___ + ### useResizeViewportHeight ▸ **useResizeViewportHeight**(): `void` @@ -156,7 +177,46 @@ ___ #### Defined in -[packages/react/src/hooks/useResizeViewportHeight.ts:3](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/react/src/hooks/useResizeViewportHeight.ts#L3) +[packages/react/src/hooks/useResizeViewportHeight.ts:3](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/react/src/hooks/useResizeViewportHeight.ts#L3) + +___ + +### useThrottleCallback + +▸ **useThrottleCallback**<`U`\>(`callback`, `delay`): (...`args`: `U`) => `void` + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `U` | extends `never`[] | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `callback` | (...`args`: `U`) => `void` | +| `delay` | `number` | + +#### Returns + +`fn` + +▸ (`...args`): `void` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `...args` | `U` | + +##### Returns + +`void` + +#### Defined in + +[packages/react/src/hooks/useThrottleCallback.ts:3](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/react/src/hooks/useThrottleCallback.ts#L3) ___ @@ -177,4 +237,4 @@ ___ #### Defined in -[packages/react/src/hooks/useTimeout.ts:5](https://github.com/mbti-nf-team/frontend-libraries/blob/c4262dc/packages/react/src/hooks/useTimeout.ts#L5) +[packages/react/src/hooks/useTimeout.ts:5](https://github.com/mbti-nf-team/frontend-libraries/blob/d191bf9/packages/react/src/hooks/useTimeout.ts#L5) diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index d6337121..49ca66eb 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,11 @@ # @nft-team/react +## 1.3.0 + +### Minor Changes + +- 37edff5: feat(@nft-team/react): useLessThenScrollY, useThrottleCallback hook 적용 + ## 1.2.2 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 47e2db7c..e72f547b 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@nft-team/react", - "version": "1.2.2", + "version": "1.3.0", "description": "nft team 리액트 라이브러리", "main": "./dist/index.js", "types": "./dist/index.d.ts",