Skip to content

Commit 19b3fbf

Browse files
committed
consistent casing
1 parent df16d5e commit 19b3fbf

24 files changed

+77
-77
lines changed

usehooks.com/src/content/hooks/useClickAway.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import StaticCodeContainer from "../../components/StaticCodeContainer.astro";
3838
<div class="table-container">
3939
| Name | Type | Description |
4040
| ---- | ------------ | ----------- |
41-
| ref | React Ref | This is a ref object returned by the hook. It should be attached to a React element to monitor click events. The ref provides a way to access the properties of the element it is attached to. |
41+
| ref | React ref | This is a ref object returned by the hook. It should be attached to a React element to monitor click events. The ref provides a way to access the properties of the element it is attached to. |
4242
</div>
4343
</div>
4444

usehooks.com/src/content/hooks/useContinuousRetry.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ import StaticCodeContainer from "../../components/StaticCodeContainer.astro";
2929
<div class="table-container">
3030
| Name | Type | Description |
3131
| -------- | -------- | ---------------------------------------------------------------------------------------------------------------------- |
32-
| callback | Function | The callback function to be executed repeatedly until it returns a truthy value. |
33-
| interval | Number | (Optional) The interval in milliseconds at which the callback function is executed. Default value is 100 milliseconds. |
32+
| callback | function | The callback function to be executed repeatedly until it returns a truthy value. |
33+
| interval | number | (Optional) The interval in milliseconds at which the callback function is executed. Default value is 100 milliseconds. |
3434
</div>
3535

3636
### Return Value
3737

3838
<div class="table-container">
3939
| Type | Description |
4040
| ------- | ------------------------------------------------------------------------------------------ |
41-
| Boolean | `true` if the callback function has resolved (returned a truthy value), `false` otherwise. |
41+
| boolean | `true` if the callback function has resolved (returned a truthy value), `false` otherwise. |
4242
</div>
4343
</div>
4444

usehooks.com/src/content/hooks/useCopyToClipboard.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ import StaticCodeContainer from "../../components/StaticCodeContainer.astro";
3333

3434
### Return Value
3535

36-
<div class="table-container">
3736
The `useCopyToClipboard` hook returns an array with the following elements:
3837

38+
<div class="table-container">
3939
| Index | Type | Description |
4040
| ----- | -------- | ------------------------------------------------------ |
4141
| 0 | string | The value that was last copied to the clipboard. |

usehooks.com/src/content/hooks/useCountdown.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ import StaticCodeContainer from "../../components/StaticCodeContainer.astro";
2828
<div class="table-container">
2929
| Name | Type | Description |
3030
| ------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
31-
| endTime | Number | The end time of the countdown in milliseconds since the Unix epoch. |
32-
| options | Object | An object containing the following options:<ul><li>`interval`: The interval in milliseconds at which the countdown should tick.</li><li>`onComplete`: A callback function to be called when the countdown reaches zero.</li><li>`onTick`: A callback function to be called on each tick of the countdown.</li></ul> |
31+
| endTime | number | The end time of the countdown in milliseconds since the Unix epoch. |
32+
| options | object | An object containing the following options:<ul><li>`interval`: The interval in milliseconds at which the countdown should tick.</li><li>`onComplete`: A callback function to be called when the countdown reaches zero.</li><li>`onTick`: A callback function to be called on each tick of the countdown.</li></ul> |
3333
</div>
3434

3535
### Return Value
3636

3737
<div class="table-container">
3838
| Name | Type | Description |
3939
| ----- | ------ | ----------------------------------- |
40-
| count | Number | The current count of the countdown. |
40+
| count | number | The current count of the countdown. |
4141
</div>
4242
</div>
4343

usehooks.com/src/content/hooks/useEventListener.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ import StaticCodeContainer from "../../components/StaticCodeContainer.astro";
2828
<div class="table-container">
2929
| Name | Type | Description |
3030
| --------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------- |
31-
| target | Ref or DOM element | The target element to attach the event listener to. It can be either a ref object (`ref.current`) or a DOM element. |
32-
| eventName | String | The name of the event to listen for. |
33-
| handler | Function | The event handler function to be executed when the event is triggered. |
34-
| options | Object | (Optional) Additional options for the event listener. |
35-
| options.capture | Boolean | Specifies whether the event should be captured during the capturing phase. Default is `false`. |
36-
| options.passive | Boolean | Specifies whether the event listener will not call `preventDefault()`. Default is `false`. |
37-
| options.once | Boolean | Specifies whether the event listener should only be invoked once. Default is `false`. |
31+
| target | ref or DOM element | The target element to attach the event listener to. It can be either a ref object (`ref.current`) or a DOM element. |
32+
| eventName | string | The name of the event to listen for. |
33+
| handler | function | The event handler function to be executed when the event is triggered. |
34+
| options | object | (Optional) Additional options for the event listener. |
35+
| options.capture | boolean | Specifies whether the event should be captured during the capturing phase. Default is `false`. |
36+
| options.passive | boolean | Specifies whether the event listener will not call `preventDefault()`. Default is `false`. |
37+
| options.once | boolean | Specifies whether the event listener should only be invoked once. Default is `false`. |
3838
</div>
3939
</div>
4040

usehooks.com/src/content/hooks/useFetch.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ import StaticCodeContainer from "../../components/StaticCodeContainer.astro";
3030
<div class="table-container">
3131
| Name | Type | Description |
3232
| ------- | ------ | ---------------------------------------------------------------------------------------- |
33-
| url | String | The URL to fetch data from. |
34-
| options | Object | (Optional) Additional options for the fetch request, such as headers or request methods. |
33+
| url | string | The URL to fetch data from. |
34+
| options | object | (Optional) Additional options for the fetch request, such as headers or request methods. |
3535
</div>
3636

3737
### Return Values
3838

3939
<div class="table-container">
4040
| Name | Type | Description |
4141
| ----------- | ------------------ | ------------------------------------------------------------------------------ |
42-
| state | Object | The state object containing the fetched data and error status. |
43-
| state.error | Error \| undefined | The error object if an error occurred during the fetch, otherwise `undefined`. |
44-
| state.data | Any \| undefined | The fetched data if the fetch was successful, otherwise `undefined`. |
42+
| state | object | The state object containing the fetched data and error status. |
43+
| state.error | error \| undefined | The error object if an error occurred during the fetch, otherwise `undefined`. |
44+
| state.data | any \| undefined | The fetched data if the fetch was successful, otherwise `undefined`. |
4545
</div>
4646
</div>
4747

usehooks.com/src/content/hooks/useHover.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import StaticCodeContainer from "../../components/StaticCodeContainer.astro";
2727
<div class="table-container">
2828
| Index | Type | Description |
2929
| ----- | ------- | -------------------------------------------------------------------------- |
30-
| 0 | Ref | A ref object that can be attached to the element intended to be hovered. |
31-
| 1 | Boolean | A boolean value indicating whether the element is currently being hovered. |
30+
| 0 | ref | A ref object that can be attached to the element intended to be hovered. |
31+
| 1 | boolean | A boolean value indicating whether the element is currently being hovered. |
3232
</div>
3333
</div>
3434

usehooks.com/src/content/hooks/useIntersectionObserver.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import StaticCodeContainer from "../../components/StaticCodeContainer.astro";
3030
| Name | Type | Default | Description |
3131
| ---------- | ------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3232
| threshold | number | 1 | Either a single number or an array of numbers between 0 and 1, indicating at what percentage of the target's visibility the observer's callback should be executed. |
33-
| root | Element | null | The Element that is used as the viewport for checking visibility of the target. Defaults to the browser viewport if not specified or if null. |
33+
| root | element | null | The Element that is used as the viewport for checking visibility of the target. Defaults to the browser viewport if not specified or if null. |
3434
| rootMargin | string | "0%" | Margin around the root. Can have values similar to the CSS margin property. The values can be percentages. This set of values serves to grow or shrink each side of the root element's bounding box before computing intersections. Defaults to all zeros. |
3535
</div>
3636

@@ -39,7 +39,7 @@ import StaticCodeContainer from "../../components/StaticCodeContainer.astro";
3939
<div class="table-container">
4040
| Name | Type | Description |
4141
| ----- | ---------------- | --------------------------------------------------------------------------------------------------------------- |
42-
| ref | React Ref Object | A React reference that can be attached to a DOM element to observe. |
42+
| ref | React ref object | A React reference that can be attached to a DOM element to observe. |
4343
| entry | object | An object containing information about the intersection. This object is similar to `IntersectionObserverEntry`. |
4444
</div>
4545
</div>

usehooks.com/src/content/hooks/useInterval.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ import StaticCodeContainer from "../../components/StaticCodeContainer.astro";
3030
<div class="table-container">
3131
| Name | Type | Description |
3232
| ---- | -------- | --------------------------------------------------------------- |
33-
| cb | Function | The callback function to be executed at the specified interval. |
34-
| ms | Number | The interval duration in milliseconds. |
33+
| cb | function | The callback function to be executed at the specified interval. |
34+
| ms | number | The interval duration in milliseconds. |
3535
</div>
3636

3737
### Return Value
3838

3939
<div class="table-container">
4040
| Name | Type | Description |
4141
| ------------- | -------- | -------------------------------------------------------- |
42-
| clearInterval | Function | A function to clear the interval and stop the execution. |
42+
| clearInterval | function | A function to clear the interval and stop the execution. |
4343
</div>
4444
</div>
4545

usehooks.com/src/content/hooks/useIntervalWhen.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ import StaticCodeContainer from "../../components/StaticCodeContainer.astro";
2929
<div class="table-container">
3030
| Name | Type | Description |
3131
| ------------------------ | -------- | --------------------------------------------------------------------------------------------------- |
32-
| cb | Function | The callback function to be executed at the specified interval when the condition is met. |
33-
| options | Object | An object containing the following options. |
34-
| options.ms | Number | The interval duration in milliseconds. |
35-
| options.when | Boolean | The condition that determines whether the interval should be active (`true`) or paused (`false`). |
36-
| options.startImmediately | Boolean | (Optional) Whether to start the interval immediately when the condition is met. Default is `false`. |
32+
| cb | function | The callback function to be executed at the specified interval when the condition is met. |
33+
| options | object | An object containing the following options. |
34+
| options.ms | number | The interval duration in milliseconds. |
35+
| options.when | boolean | The condition that determines whether the interval should be active (`true`) or paused (`false`). |
36+
| options.startImmediately | boolean | (Optional) Whether to start the interval immediately when the condition is met. Default is `false`. |
3737
</div>
3838

3939
### Return Value
4040

4141
<div class="table-container">
4242
| Type | Description |
4343
| -------- | --------------------------------------------------------- |
44-
| Function | A function to clear the interval and pause the execution. |
44+
| function | A function to clear the interval and pause the execution. |
4545
</div>
4646
</div>
4747

0 commit comments

Comments
 (0)