Skip to content

Commit bb7cb82

Browse files
committed
doc formatting fixed
1 parent 6a2d28b commit bb7cb82

1 file changed

Lines changed: 23 additions & 4 deletions

File tree

readme.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,11 @@ function MyApp() {
9999

100100
<details>
101101
<summary>
102-
<b>VirtualListY component</b>
102+
<b>Vertical list component</b>
103103
</summary>
104104

105+
<br>
106+
105107
This component is used to render vertical list
106108

107109
```tsx
@@ -144,9 +146,11 @@ function MyApp() {
144146

145147
<details>
146148
<summary>
147-
<b>VirtualListX component</b>
149+
<b>Horizontal list component</b>
148150
</summary>
149151

152+
<br>
153+
150154
This component is used to render horizontal list
151155

152156
```tsx
@@ -188,15 +192,18 @@ function MyApp() {
188192

189193
<details>
190194
<summary>
191-
<b>VirtualGrid component</b>
195+
<b>Grid component</b>
192196
</summary>
193197

198+
<br>
199+
194200
This component is used to render grid
195201

196202
```tsx
197203
import { VirtualGrid } from "react-virtual-overflow/lib/fixed-grid";
198204

199205
type VirtualGridProps<ItemT> = {
206+
// rows
200207
items: ItemT[][],
201208
columnsNum: number,
202209
itemWidth: number,
@@ -234,6 +241,8 @@ function GridExample() {
234241
<b>Vertical list hook</b>
235242
</summary>
236243

244+
<br>
245+
237246
`useVirtualOverflowY` hook that computes and renders vertical list
238247

239248
It accepts this params:
@@ -280,6 +289,8 @@ And returns:
280289
<b>Horizontal list hook</b>
281290
</summary>
282291

292+
<br>
293+
283294
`useVirtualOverflowX` hook that computes and renders horizontal list
284295

285296
It accepts this params:
@@ -326,7 +337,9 @@ And returns:
326337
<b>Grid hook</b>
327338
</summary>
328339

329-
`useVirtualOverflowGrid` hook that computes and renders horizontal list
340+
<br>
341+
342+
`useVirtualOverflowGrid` hook that computes and renders grid
330343

331344
It accepts this params:
332345

@@ -378,6 +391,8 @@ And returns:
378391
<b>useCalcVirtualOverflow - universal hook for fixed list/grid</b>
379392
</summary>
380393

394+
<br>
395+
381396
`useCalcVirtualOverflow` hook that computes visible rect at calculates slice of items that should be rendered
382397

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

439+
<br>
440+
424441
`virtualOverflowCalcVisibleRect` method will calculate on screen visible rect of some element
425442

426443
It accepts this params:
@@ -447,6 +464,8 @@ function virtualOverflowCalcVisibleRect(element: HTMLElement): {
447464
<b>Slice calculation from visible rect</b>
448465
</summary>
449466

467+
<br>
468+
450469
`virtualOverflowCalcItems` method will calculate slice of items from visible rect
451470

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

0 commit comments

Comments
 (0)