Skip to content

Commit 0d05027

Browse files
committed
docs: use latest and update banner examples
1 parent a5b38b6 commit 0d05027

File tree

6 files changed

+24
-20
lines changed

6 files changed

+24
-20
lines changed

documentation/docs/examples/banners.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const Component = () => {
2929
{ image: '/static/banner-background.jpg', speed: -20 },
3030
{ image: '/static/banner-foreground.png', speed: -10 },
3131
]}
32-
className="ratio-2/1"
32+
className="aspect-[2/1]"
3333
/>
3434
);
3535
};
@@ -57,7 +57,7 @@ const Component = () => {
5757
{ image: '/static/banner-background.jpg', speed: -20 },
5858
{ image: '/static/banner-foreground.png', speed: -10 },
5959
]}
60-
className="ratio-2/1"
60+
className="aspect-[2/1]"
6161
>
6262
<div className="absolute inset-0 flex items-center justify-center">
6363
<h1 className="text-8xl text-white font-thin">Hello World!</h1>
@@ -82,7 +82,7 @@ const Component = () => {
8282
layers={[
8383
{ image: '/static/banner-background.jpg', speed: -20 },
8484
{
85-
speed: -12,
85+
speed: -15,
8686
children: (
8787
<div className="absolute inset-0 flex items-center justify-center">
8888
<h1 className="text-8xl text-white font-thin">Hello World!</h1>
@@ -91,7 +91,7 @@ const Component = () => {
9191
},
9292
{ image: '/static/banner-foreground.png', speed: -10 },
9393
]}
94-
className="ratio-2/1"
94+
className="aspect-[2/1]"
9595
>
9696
<div className="absolute inset-0 flex items-center justify-center">
9797
<h1 className="text-8xl text-white font-thin">Hello World!</h1>

documentation/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"prism-react-renderer": "^1.2.1",
2323
"react": "^17.0.1",
2424
"react-dom": "^17.0.1",
25-
"react-scroll-parallax": "^3.0.0-beta.9"
25+
"react-scroll-parallax": "^3.0.0-beta.13"
2626
},
2727
"browserslist": {
2828
"production": [

documentation/src/components/parallax-banner-embed-headline/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ export const ParallaxBannerEmbedHeadline = () => {
1212
shouldAlwaysCompleteAnimation: true,
1313
},
1414
{
15-
speed: -12,
15+
speed: -20,
1616
children: (
1717
<div className="absolute inset-0 flex items-center justify-center">
18-
<h1 className="text-8xl text-white font-thin">Hello World!</h1>
18+
<h1 className="text-6xl md:text-8xl text-white font-thin">
19+
Hello World!
20+
</h1>
1921
</div>
2022
),
2123
shouldAlwaysCompleteAnimation: true,
@@ -27,7 +29,7 @@ export const ParallaxBannerEmbedHeadline = () => {
2729
shouldAlwaysCompleteAnimation: true,
2830
},
2931
]}
30-
className="h-48"
32+
className="aspect-[2/1]"
3133
/>
3234
);
3335
};

documentation/src/components/parallax-banner-images/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const ParallaxBannerImages = () => {
1818
shouldAlwaysCompleteAnimation: true,
1919
},
2020
]}
21-
className="h-48"
21+
className="aspect-[2/1]"
2222
/>
2323
);
2424
};

documentation/src/components/parallax-banner-with-headline/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ export const ParallaxBannerWithHeadline = () => {
1818
shouldAlwaysCompleteAnimation: true,
1919
},
2020
]}
21-
className="h-48"
21+
className="aspect-[2/1]"
2222
>
2323
<div className="absolute inset-0 flex items-center justify-center">
24-
<h1 className="text-8xl text-white font-thin">Hello World!</h1>
24+
<h1 className="text-6xl md:text-8xl text-white font-thin">
25+
Hello World!
26+
</h1>
2527
</div>
2628
</ParallaxBanner>
2729
);

documentation/yarn.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5402,10 +5402,10 @@ package-json@^6.3.0:
54025402
registry-url "^5.0.0"
54035403
semver "^6.2.0"
54045404

5405-
parallax-controller@^1.2.0:
5406-
version "1.2.0"
5407-
resolved "https://registry.yarnpkg.com/parallax-controller/-/parallax-controller-1.2.0.tgz#c6358302f4111bb975fa94409595c309dccd99e8"
5408-
integrity sha512-o3tbh7tHw5pYKA+29aiQ2zsb5EtYIqED3oGoloLzezMvSTC9FAGwxpWzAyZ9A7529FTo2Q7xNgGtfvU1jF78+Q==
5405+
parallax-controller@^1.3.0:
5406+
version "1.3.0"
5407+
resolved "https://registry.yarnpkg.com/parallax-controller/-/parallax-controller-1.3.0.tgz#13da9f62de778ddba2fe6e96682b6c0815140516"
5408+
integrity sha512-0rY8r5+bxE2+Gr1nShCKQuMAOHUgEGIXb8ne3TmotplOBA75AnTXjyPnnoTcdKeapcA4yLG8K0xQoRCRlXZluQ==
54095409
dependencies:
54105410
bezier-easing "^2.1.0"
54115411

@@ -6179,12 +6179,12 @@ react-router@5.2.1, react-router@^5.2.0:
61796179
tiny-invariant "^1.0.2"
61806180
tiny-warning "^1.0.0"
61816181

6182-
react-scroll-parallax@^3.0.0-beta.9:
6183-
version "3.0.0-beta.9"
6184-
resolved "https://registry.yarnpkg.com/react-scroll-parallax/-/react-scroll-parallax-3.0.0-beta.9.tgz#324b59a2876aa28dc852a832efe42410cddddecf"
6185-
integrity sha512-n8KpI4myAu1hUC/lypt+3wDZTqMM868KNcbjKSMLWpgVdJoZhgqORcO95N+cGKquBU7tjSUk2jMub/pBYEC3FQ==
6182+
react-scroll-parallax@^3.0.0-beta.13:
6183+
version "3.0.0-beta.13"
6184+
resolved "https://registry.yarnpkg.com/react-scroll-parallax/-/react-scroll-parallax-3.0.0-beta.13.tgz#2572f6e4012097d44f82221cdbfc84f4619f0d1d"
6185+
integrity sha512-G18AVKqaTL9xGTVbM0edMp221NRPudy4ZKdJ19O3ZUKfG7RPXg2C0njrj5tiiFOkQUJQO4mTOo/zoo+EwVlpuA==
61866186
dependencies:
6187-
parallax-controller "^1.2.0"
6187+
parallax-controller "^1.3.0"
61886188

61896189
react-side-effect@^2.1.0:
61906190
version "2.1.1"

0 commit comments

Comments
 (0)