-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # package.json
- Loading branch information
Showing
5 changed files
with
58 additions
and
3 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
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,14 @@ | ||
import { useContext } from 'react'; | ||
import ParallaxContext from '../helpers/ParallaxContext'; | ||
|
||
export default () => { | ||
const parallaxController = useContext(ParallaxContext); | ||
|
||
if (!parallaxController) { | ||
throw new Error( | ||
'Could not find `react-scroll-parallax` context value. Please ensure the component is wrapped in a <ParallaxProvider>' | ||
); | ||
} | ||
|
||
return { parallaxController }; | ||
}; |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
// all module exports | ||
export useController from './components/useController'; | ||
export withController from './components/withController'; | ||
export Parallax from './components/Parallax'; | ||
export ParallaxProvider from './components/ParallaxProvider'; | ||
export ParallaxBanner from './components/ParallaxBanner'; | ||
export ParallaxContext from './helpers/ParallaxContext'; |