Skip to content

Commit 263399c

Browse files
committed
docs(rescript-dom, rescript-abort-controller): update README.md
1 parent 81dd662 commit 263399c

File tree

5 files changed

+92
-1
lines changed

5 files changed

+92
-1
lines changed
File renamed without changes.
File renamed without changes.

examples/dev/dev__intersection.js

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rescript-abort-controller/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ abortController->AbortController.signal
3535
abortController->AbortController.abort
3636
```
3737

38-
Or you can check this [**examples**](https://github.com/ri7nz/rescript-intersection-observer/tree/main/examples).
38+
Or you can check this [**examples**](https://github.com/ri7nz/rescript-intersection-observer/tree/main/examples/dev/dev__abortcontroller.res).
3939

4040
## API
4141
> (WIP)

rescript-dom/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# rescript-intersection-observer
2+
> nearly zero-cost bind [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver)
3+
4+
5+
## Installation
6+
7+
Run the following in your favorit console:
8+
```console
9+
> yarn add @ri7nz/rescript-dom
10+
```
11+
12+
**OR**
13+
14+
```console
15+
> npm install --save @ri7nz/rescript-dom
16+
```
17+
18+
Then, add `@ri7nz/rescript-dom` in your `bsconfig.json`:
19+
20+
```diff
21+
-- "bs-dependencies": [],
22+
++ "bs-dependencies": ["@ri7nz/rescript-dom"],
23+
```
24+
25+
## Usage
26+
27+
```rescript
28+
open ResDOM
29+
30+
// example boundingClientRect
31+
let boundingClientRect = ...
32+
// access property of boundingClientRect with DOMRect module
33+
boundingClientRect->DOMRect.x
34+
boundingClientRect->DOMRect.width
35+
boundingClientRect->DOMRect.height
36+
boundingClientRect->DOMRect.top
37+
boundingClientRect->DOMRect.right
38+
boundingClientRect->DOMRect.bottom
39+
boundingClientRect->DOMRect.left
40+
boundingClientRect->DOMRect.toJson
41+
```
42+
43+
Or you can check this [**examples**](https://github.com/ri7nz/rescript-libs/tree/main/examples/dev/dev__intersection.res).
44+
45+
## API
46+
> (WIP): docs

0 commit comments

Comments
 (0)