Skip to content

Commit

Permalink
doc formatting fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Morglod committed Jul 14, 2024
1 parent 6a2d28b commit 886fa93
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ function MyApp() {

<details>
<summary>
<b>VirtualListY component</b>
<b>Vertical list component</b>
</summary>

<br>

This component is used to render vertical list

```tsx
Expand Down Expand Up @@ -144,9 +146,11 @@ function MyApp() {

<details>
<summary>
<b>VirtualListX component</b>
<b>Horizontal list component</b>
</summary>

<br>

This component is used to render horizontal list

```tsx
Expand Down Expand Up @@ -188,9 +192,11 @@ function MyApp() {

<details>
<summary>
<b>VirtualGrid component</b>
<b>Grid component</b>
</summary>

<br>

This component is used to render grid

```tsx
Expand Down Expand Up @@ -234,6 +240,8 @@ function GridExample() {
<b>Vertical list hook</b>
</summary>

<br>

`useVirtualOverflowY` hook that computes and renders vertical list

It accepts this params:
Expand Down Expand Up @@ -280,6 +288,8 @@ And returns:
<b>Horizontal list hook</b>
</summary>

<br>

`useVirtualOverflowX` hook that computes and renders horizontal list

It accepts this params:
Expand Down Expand Up @@ -326,7 +336,9 @@ And returns:
<b>Grid hook</b>
</summary>

`useVirtualOverflowGrid` hook that computes and renders horizontal list
<br>

`useVirtualOverflowGrid` hook that computes and renders grid

It accepts this params:

Expand Down Expand Up @@ -378,6 +390,8 @@ And returns:
<b>useCalcVirtualOverflow - universal hook for fixed list/grid</b>
</summary>

<br>

`useCalcVirtualOverflow` hook that computes visible rect at calculates slice of items that should be rendered

It could be used if you want to render items manually, and you need only slice calculated
Expand Down Expand Up @@ -421,6 +435,8 @@ And returns:
<b>Calculate visible on screen rect</b>
</summary>

<br>

`virtualOverflowCalcVisibleRect` method will calculate on screen visible rect of some element

It accepts this params:
Expand All @@ -447,6 +463,8 @@ function virtualOverflowCalcVisibleRect(element: HTMLElement): {
<b>Slice calculation from visible rect</b>
</summary>

<br>

`virtualOverflowCalcItems` method will calculate slice of items from visible rect

You can pass here horizontal and vertical values from "calcVisibleRect" method.
Expand Down

0 comments on commit 886fa93

Please sign in to comment.