-
Notifications
You must be signed in to change notification settings - Fork 156
Closed
Labels
Description
Trouble With Implementation
Hi everyone, I'm so sorry if I missed something obvious, but I can't seem to figure out how to implement this library, and it's just been an overall headache to figure out. I've spent quite a while looking at the docs and example code but can't seem to get a working version. Help would be greatly appreciated! Again, sorry if I had missed something somewhere.
type ParallaxHomePageProps = {
parallaxController: {
update: () => void;
destroy: () => void;
};
};
type ParallaxHomePageState = {};
export class ParallaxHomePage extends React.Component<
ParallaxHomePageProps,
ParallaxHomePageState
> {
constructor(props: ParallaxHomePageProps) {
super(props);
this.state = {};
}
render() {
return (
<ParallaxProvider>
<div style={{ height: "100%", overflow: "auto", display: "flex" }}>
<div style={{ position: "relative" }} className="full-width"> // full-width = fill remaining width
<Parallax className="custom-class" x={[-20, 20]}>
<h1>AAAAAAAAAAAAAAA</h1>
</Parallax>
<Parallax className="custom-class" x={[-20, 20]}>
<h1>AAAAAAAAAAAAAAA</h1>
</Parallax>
<Parallax className="custom-class" x={[-20, 20]}>
<h1>AAAAAAAAAAAAAAA</h1>
</Parallax>
</div>
</div>
</ParallaxProvider>
);
}
}