-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Export types in index.ts * Fix import * Update RevealConfig + tweak how lib is exported * Group exports * Expose DEFAULT_REVEAL_CONFIG * Update README.md Co-authored-by: John Richard Chipps-Harding <john.chipps-harding@phntms.com> * Rename `IN_BROWSER` to `IS_BROWSER` Co-authored-by: John Richard Chipps-Harding <john.chipps-harding@phntms.com>
- Loading branch information
Showing
7 changed files
with
47 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export interface RevealConfig { | ||
delayBetweenQueuedElements: number; | ||
thresholdToRevealElements: number; | ||
revealSelector: string; | ||
visibleClass: string; | ||
hiddenClass: string; | ||
} | ||
|
||
export const DEFAULT_REVEAL_CONFIG: RevealConfig = { | ||
delayBetweenQueuedElements: 150, | ||
thresholdToRevealElements: 0.2, | ||
revealSelector: ".reveal-on-scroll", | ||
visibleClass: "reveal-scrolled", | ||
hiddenClass: "reveal-hidden", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export const IN_BROWSER = window !== undefined; | ||
export const IS_BROWSER = window !== undefined; | ||
|
||
export const HAS_INTERSECTION_OBSERVER = !!window.IntersectionObserver; |
This file was deleted.
Oops, something went wrong.