Skip to content

Commit d5a9db6

Browse files
authored
Merge pull request #4 from jscottsmith/update-examples
feat: update parallax-example
2 parents e1f6d03 + 5851d88 commit d5a9db6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+4770
-38751
lines changed

.babelrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.editorconfig

Lines changed: 0 additions & 12 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 245 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
2-
*dist
32
npm-debug.log
3+
.parcel-cache
4+
.DS_Store

babelrc.js

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Parallax Example Site
2+
3+
The original example site using `react-scroll-parallax` upgraded to version 3.
4+
5+
🔗 [View Site](https://jscottsmith.github.io/react-scroll-parallax-examples/examples/parallax-example/dist/)
6+
7+
- Made with [react-scroll-parallax v3](https://github.com/jscottsmith/react-scroll-parallax)
8+
- Now with better [documentation](https://react-scroll-parallax.damnthat.tv)
9+
- Check it out [on NPM](https://www.npmjs.com/package/react-scroll-parallax)
10+
11+
## Dev
12+
13+
Packed with [parcel](https://parceljs.org/). Use `yarn start` to run locally.

examples/parallax-example/client.js

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import React, { Component } from 'react';
2-
import { ParallaxProvider } from 'react-scroll-parallax';
3-
import { ParallaxExample } from 'components';
1+
import React, { Component } from "react";
2+
import { ParallaxProvider } from "react-scroll-parallax";
3+
import { ParallaxExample } from "../";
44

55
export default class App extends Component {
6-
render() {
7-
return (
8-
<ParallaxProvider>
9-
<ParallaxExample />
10-
</ParallaxProvider>
11-
);
12-
}
6+
render() {
7+
return (
8+
<ParallaxProvider>
9+
<ParallaxExample />
10+
</ParallaxProvider>
11+
);
12+
}
1313
}
Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,25 @@
1-
import React from 'react';
2-
import style from './Intro.scss';
3-
import { Svg } from 'components';
4-
import { Parallax } from 'react-scroll-parallax';
5-
import ring from '!!raw-loader!./ring-of-dots.svg';
6-
import hemispheres from '!!raw-loader!./hemispheres.svg';
1+
import React from "react";
2+
import { Parallax } from "react-scroll-parallax";
3+
import * as style from "./Intro.module.scss";
4+
import { Svg } from "../";
5+
import ring from "bundle-text:./ring-of-dots.svg";
6+
import hemispheres from "bundle-text:./hemispheres.svg";
77

88
const Intro = () => (
9-
<div className={style.root}>
10-
<div className={style.container}>
11-
<Parallax
12-
offsetYMin={-100}
13-
offsetYMax={100}
14-
className={style.ring}
15-
>
16-
<Svg svg={ring} />
17-
</Parallax>
18-
<Parallax
19-
offsetYMin={-50}
20-
offsetYMax={50}
21-
className={style.circle}
22-
>
23-
<div className={style.circleInner}/>
24-
</Parallax>
25-
<Svg
26-
className={style.hemispheres}
27-
svg={hemispheres}
28-
/>
9+
<div className={style.root}>
10+
<div className={style.container}>
11+
<Parallax translateY={[100, -100]} className={style.ring}>
12+
<Svg svg={ring} />
13+
</Parallax>
14+
<Parallax translateY={[50, -50]} className={style.circle}>
15+
<div className={style.parallaxInner}>
16+
<div className={style.circleInner} />
2917
</div>
30-
<p className={style.scroll}>Scroll</p>
18+
</Parallax>
19+
<Svg className={style.hemispheres} svg={hemispheres} />
3120
</div>
21+
<p className={style.scroll}>Scroll</p>
22+
</div>
3223
);
3324

3425
export default Intro;

0 commit comments

Comments
 (0)