Skip to content

Commit ee0db99

Browse files
committed
docs(intersect): complete example 2
1 parent 1d45d9e commit ee0db99

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/actions/intersect/src/intersect.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,16 @@ export interface IntersectDetail {
8282
* </script>
8383
*
8484
* <section
85+
* use:intersect={{ threshold: 0.4 }}
86+
* on:intersect={onIntersect}
87+
* >
8588
* >
8689
* <p>
8790
* A section that reacts to when scrolling in view (intersecting === true)
8891
* and scrolling out of view (intersecting === false)
8992
* </p>
9093
* {#if intersecting !== undefined}
91-
* <p class="self-end">Scrolling {intersecting ? 'into view' : 'out of view'}...</p>
94+
* <p>Scrolling {intersecting ? 'into view' : 'out of view'}...</p>
9295
* {/if}
9396
* </section
9497
* ```

0 commit comments

Comments
 (0)