Skip to content

Commit e4f2d8f

Browse files
committed
docs: adjust type interfaces to remove I prefix
1 parent 2a6d6dd commit e4f2d8f

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

docs/api/ObserveViewport_connectViewport_useViewport.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Render props are easy to implement in the most situations but the event handler
1010

1111
| Property | Type | Required? | Description |
1212
|:---|:---|:---:|:---|
13-
| onUpdate | function | | Triggers as soon as a viewport update was detected. Contains the `IViewport` as the first argument and the last return of `recalculateLayoutBeforeUpdate` as the second argument |
14-
| recalculateLayoutBeforeUpdate | function | | Enables a way to calculate layout information for all components as a badge before the onUpdate call. Contains the `IViewport` as the first argument. See [recalculateLayoutBeforeUpdate](../concepts/recalculateLayoutBeforeUpdate.md) |
15-
| children | function | | Like `onUpdate` but expects to return that will be rendered on the page. Contains the `IViewport` as the first argument. |
13+
| onUpdate | function | | Triggers as soon as a viewport update was detected. Contains the `Viewport` as the first argument and the last return of `recalculateLayoutBeforeUpdate` as the second argument |
14+
| recalculateLayoutBeforeUpdate | function | | Enables a way to calculate layout information for all components as a badge before the onUpdate call. Contains the `Viewport` as the first argument. See [recalculateLayoutBeforeUpdate](../concepts/recalculateLayoutBeforeUpdate.md) |
15+
| children | function | | Like `onUpdate` but expects to return that will be rendered on the page. Contains the `Viewport` as the first argument. |
1616
| deferUpdateUntilIdle | boolean | | Defers to trigger updates until the collector is idle. See [Defer Events](../concepts/defer_events.md) |
1717
| priority | `'low'`, `'normal'`, `'high'`, `'highest'` | | Allows to set a priority of the update. See [Defer Events](../concepts/scheduler.md) |
1818
| disableScrollUpdates | boolean | | Disables updates to scroll events |
@@ -129,12 +129,12 @@ Hook effects allow to trigger side effects on change without updating the compon
129129

130130
| Argument | Type | Required? | Description |
131131
|:---|:---|:---:|:---|
132-
| effect | (IViewport \| IScroll \| IDimensions) => void | x | Disables updates to scroll events (only for `useViewport`) |
132+
| effect | (Viewport \| Scroll \| Dimensions) => void | x | Disables updates to scroll events (only for `useViewport`) |
133133
| options.disableScrollUpdates | boolean | | Disables updates to scroll events (only for `useViewport`) |
134134
| options.disableDimensionsUpdates | boolean | | Disables updates to dimensions events (only for `useViewport`) |
135135
| options.deferUpdateUntilIdle | boolean | | Defers to trigger updates until the collector is idle. See [Defer Events](../concepts/defer_events.md) |
136136
| options.priority | `'low'`, `'normal'`, `'high'`, `'highest'` | | Allows to set a priority of the update. See [Defer Events](../concepts/scheduler.md) |
137-
| options.recalculateLayoutBeforeUpdate | function | | Enables a way to calculate layout information for all components as a badge before the effect call. Contains `IViewport`, `IScroll` or `IDimensions` as the first argument, dependent of the used hook. See [recalculateLayoutBeforeUpdate](../concepts/recalculateLayoutBeforeUpdate.md) |
137+
| options.recalculateLayoutBeforeUpdate | function | | Enables a way to calculate layout information for all components as a badge before the effect call. Contains `Viewport`, `Scroll` or `Dimensions` as the first argument, dependent of the used hook. See [recalculateLayoutBeforeUpdate](../concepts/recalculateLayoutBeforeUpdate.md) |
138138
| deps | array | | Array with dependencies. In case a value inside the array changes, this will force an update to the effect function |
139139

140140
### Example

docs/api/types.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# Types
22

3-
## IScroll
3+
## Scroll
44

55
For scroll events the `scroll` object is exposed which contains the following properties.
66

77
| Property | Type | Description |
88
|:---|:---|:---|
99
| x | number | Horizontal scroll position |
1010
| y | number | Vertical scroll position |
11-
| xTurn | number | Horizontal scroll position where the scroll direction turned in the opposite direction |
12-
| yTurn | number | Vertical scroll position where the scroll direction turned in the opposite direction |
13-
| xDTurn | number | Difference of the horizontal scroll position where the scroll direction turned in the opposite direction |
14-
| yDTurn | number | Difference of the vertical scroll position where the scroll direction turned in the opposite direction |
11+
| xTurn | number | Horizontal scroll position where the scroll dRection turned in the opposite dRection |
12+
| yTurn | number | Vertical scroll position where the scroll dRection turned in the opposite dRection |
13+
| xDTurn | number | Difference of the horizontal scroll position where the scroll dRection turned in the opposite dRection |
14+
| yDTurn | number | Difference of the vertical scroll position where the scroll dRection turned in the opposite dRection |
1515
| isScrollingUp | boolean | Whether the page is scrolling up |
1616
| isScrollingDown | boolean | Whether the page is scrolling down |
1717
| isScrollingLeft | boolean | Whether the page is scrolling left |
1818
| isScrollingRight | boolean | Whether the page is scrolling right |
1919

20-
## IDimensions
20+
## Dimensions
2121

2222
| Property | Type | Description |
2323
|:---|:---|:---|
@@ -30,15 +30,15 @@ For scroll events the `scroll` object is exposed which contains the following pr
3030
| documentWidth | number | Complete width of the document |
3131
| documentHeight | number | Complete height of the document |
3232

33-
## IViewport
33+
## Viewport
3434

3535
| Property | Type | Description |
3636
|:---|:---|:---|
37-
| scroll | IScroll | See IScroll type above |
38-
| dimensions | IDimensions | See IDimensions type above |
37+
| scroll | Scroll | See Scroll type above |
38+
| dimensions | Dimensions | See Dimensions type above |
3939

4040

41-
## IRect
41+
## Rect
4242

4343
| Property | Type | Description |
4444
|:---|:---|:---|

docs/api/useRect.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Same as the `useRect` hook but as an effect, therefore it does not return anythi
5151

5252
| Argument | Type | Required? | Description |
5353
|:---|:---|:---:|:---|
54-
| effect | (rect: IRect \| null) => void | x | The side effect that should be performed |
54+
| effect | (rect: Rect \| null) => void | x | The side effect that should be performed |
5555
| ref | React.RefObject\<HTMLElement> | x | The reference to an element that should be observed |
5656
| options.disableScrollUpdates | boolean | | Disables updates to scroll events (only for `useViewport`) |
5757
| options.disableDimensionsUpdates | boolean | | Disables updates to dimensions events (only for `useViewport`) |

docs/concepts/scheduler.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The scheduler is for now disabled by default and needs to be activated on the `V
1515
**!!! This is an experimental API and its implementation might change in the future !!!**
1616

1717
``` javascript
18-
const handleUpdate = ({ scroll, dimensions }: IViewport) {
18+
const handleUpdate = ({ scroll, dimensions }: Viewport) {
1919
console.log(scroll, dimensions);
2020
}
2121

0 commit comments

Comments
 (0)