Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 70b6669

Browse files
update ParallaxBanner stories
1 parent 06cfe71 commit 70b6669

File tree

1 file changed

+27
-45
lines changed

1 file changed

+27
-45
lines changed

‎stories/ParallaxBanner/ParallaxBanner.stories.js‎

Lines changed: 27 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@ import styles from './ParallaxBanner.scss';
1212
import '../styles.scss';
1313

1414
storiesOf('<ParallaxBanner>', module)
15-
.add('with a full page background', () => (
15+
.add('with a single background', () => (
1616
<ParallaxBanner
17-
style={{
18-
height: '100vh',
19-
}}
2017
className={styles.bannerBg}
2118
layers={[
2219
{
@@ -28,8 +25,11 @@ storiesOf('<ParallaxBanner>', module)
2825
]}
2926
/>
3027
))
31-
.add('with a single background', () => (
28+
.add('with a full page background', () => (
3229
<ParallaxBanner
30+
style={{
31+
height: '100vh',
32+
}}
3333
className={styles.bannerBg}
3434
layers={[
3535
{
@@ -58,53 +58,17 @@ storiesOf('<ParallaxBanner>', module)
5858
</div>
5959
</ParallaxBanner>
6060
))
61-
.add('with parallax disabled', () => (
62-
<ParallaxBanner
63-
className={styles.bannerBg}
64-
disabled
65-
layers={[
66-
{
67-
image:
68-
'https://s3-us-west-2.amazonaws.com/s.cdpn.io/105988/banner.jpg',
69-
amount: 0.2,
70-
slowerScrollRate: false,
71-
},
72-
]}
73-
>
74-
<div className={styles.parallaxChildren}>
75-
<h1>Disabled Parallax</h1>
76-
</div>
77-
</ParallaxBanner>
78-
))
7961
.add('with multiple backgrounds', () => {
8062
const layers = [
8163
{
8264
image:
83-
'https://s3-us-west-2.amazonaws.com/s.cdpn.io/105988/parallax-background-1.png',
84-
amount: 0,
85-
slowerScrollRate: false,
86-
},
87-
{
88-
image:
89-
'https://s3-us-west-2.amazonaws.com/s.cdpn.io/105988/parallax-background-2.png',
90-
amount: 0.1,
91-
slowerScrollRate: false,
92-
},
93-
{
94-
image:
95-
'https://s3-us-west-2.amazonaws.com/s.cdpn.io/105988/parallax-background-3.png',
65+
'https://s3-us-west-2.amazonaws.com/s.cdpn.io/105988/banner-background.jpg',
9666
amount: 0.2,
9767
slowerScrollRate: false,
9868
},
9969
{
10070
image:
101-
'https://s3-us-west-2.amazonaws.com/s.cdpn.io/105988/parallax-background-4.png',
102-
amount: 0.3,
103-
slowerScrollRate: false,
104-
},
105-
{
106-
image:
107-
'https://s3-us-west-2.amazonaws.com/s.cdpn.io/105988/parallax-background-5.png',
71+
'https://s3-us-west-2.amazonaws.com/s.cdpn.io/105988/banner-foreground.png',
10872
amount: 0.4,
10973
slowerScrollRate: false,
11074
},
@@ -113,7 +77,25 @@ storiesOf('<ParallaxBanner>', module)
11377
<ParallaxBanner
11478
className={styles.bannerBg}
11579
layers={layers}
116-
style={{ height: '50vh' }}
80+
style={{ height: '75vh' }}
11781
/>
11882
);
119-
});
83+
})
84+
.add('with parallax disabled', () => (
85+
<ParallaxBanner
86+
className={styles.bannerBg}
87+
disabled
88+
layers={[
89+
{
90+
image:
91+
'https://s3-us-west-2.amazonaws.com/s.cdpn.io/105988/banner.jpg',
92+
amount: 0.2,
93+
slowerScrollRate: false,
94+
},
95+
]}
96+
>
97+
<div className={styles.parallaxChildren}>
98+
<h1>Disabled Parallax</h1>
99+
</div>
100+
</ParallaxBanner>
101+
));

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /