File tree Expand file tree Collapse file tree 7 files changed +46
-6
lines changed Expand file tree Collapse file tree 7 files changed +46
-6
lines changed Original file line number Diff line number Diff line change 74
74
}
75
75
],
76
76
"dependencies" : {
77
- "parallax-controller" : " 0.1.13 "
77
+ "parallax-controller" : " 0.1.14 "
78
78
},
79
79
"devDependencies" : {
80
80
"@babel/core" : " ^7.16.0" ,
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ export function Parallax(props: PropsWithChildren<ParallaxProps>) {
49
49
scaleX : props . scaleX ,
50
50
scaleY : props . scaleY ,
51
51
scaleZ : props . scaleZ ,
52
+ opacity : props . opacity ,
52
53
} ) ,
53
54
} ;
54
55
}
@@ -88,6 +89,7 @@ export function Parallax(props: PropsWithChildren<ParallaxProps>) {
88
89
props . scaleY ,
89
90
props . scaleZ ,
90
91
props . speed ,
92
+ props . opacity ,
91
93
] ) ;
92
94
93
95
const Outer = props . tagOuter ;
Original file line number Diff line number Diff line change @@ -120,6 +120,17 @@ export interface ParallaxProps {
120
120
* Second value is the ending scale
121
121
*/
122
122
scaleZ ?: number [ ] ;
123
+ /**
124
+ * Start and end opacity value
125
+ *
126
+ * Example:
127
+ *
128
+ * opacity={[0, 1]}
129
+ *
130
+ * First value is the starting opacity
131
+ * Second value is the ending opacity
132
+ */
133
+ opacity ?: number [ ] ;
123
134
/**
124
135
* Optionally pass additional class names to be added to the outermost parallax element.
125
136
*/
Original file line number Diff line number Diff line change @@ -71,6 +71,6 @@ WithTranslateYAndRotation.args = {
71
71
} ;
72
72
73
73
export default {
74
- title : '<Parallax> New Transforms ' ,
74
+ title : '<Parallax> Rotation ' ,
75
75
component : WithRotation ,
76
76
} ;
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+ import { Parallax } from '../../src' ;
3
+ import { Element } from '../Element/Element' ;
4
+ import { Container } from '../Container' ;
5
+ import styles from './Parallax.module.scss' ;
6
+
7
+ const Template = ( args ) => {
8
+ const props = args ;
9
+ return (
10
+ < Container scrollAxis = "vertical" className = { styles . elements } >
11
+ < Parallax { ...props } className = { styles . parallax } >
12
+ < Element name = "A" />
13
+ </ Parallax >
14
+ </ Container >
15
+ ) ;
16
+ } ;
17
+
18
+ export const WithOpacity = Template . bind ( { } ) ;
19
+
20
+ WithOpacity . args = {
21
+ opacity : [ 0 , 1 ] ,
22
+ } ;
23
+
24
+ export default {
25
+ title : '<Parallax> Opacity' ,
26
+ component : WithOpacity ,
27
+ } ;
File renamed without changes.
Original file line number Diff line number Diff line change @@ -11050,10 +11050,10 @@ pako@~1.0.5:
11050
11050
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf"
11051
11051
integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==
11052
11052
11053
- parallax-controller@0.1.13 :
11054
- version "0.1.13 "
11055
- resolved "https://registry.yarnpkg.com/parallax-controller/-/parallax-controller-0.1.13 .tgz#5e93b76cc849f1f96ee5915d547a0c98f3b244ff "
11056
- integrity sha512-rvUBtY/ebt5Z3hK6cZ9n2LoeYn5+AeZ273/UZbXuQFcgCizQtFt7x1/8zb4BrL09EwFWsx+HSQD2gg2UwzUicg ==
11053
+ parallax-controller@0.1.14 :
11054
+ version "0.1.14 "
11055
+ resolved "https://registry.yarnpkg.com/parallax-controller/-/parallax-controller-0.1.14 .tgz#aee3459754fe08ca29898fc1b8721d785737cdae "
11056
+ integrity sha512-lzrnXq/kMUqZ5IwPNK/kzHR4obBYgeBEzijt/zqAkLJ7AAHvhdtoizb+wyVfmpGK5OCFAthwl/9q9kIrAHu7qw ==
11057
11057
11058
11058
parallel-transform@^1.1.0:
11059
11059
version "1.2.0"
You can’t perform that action at this time.
0 commit comments