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 7474 }
7575 ],
7676 "dependencies" : {
77- "parallax-controller" : " 0.1.13 "
77+ "parallax-controller" : " 0.1.14 "
7878 },
7979 "devDependencies" : {
8080 "@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>) {
4949 scaleX : props . scaleX ,
5050 scaleY : props . scaleY ,
5151 scaleZ : props . scaleZ ,
52+ opacity : props . opacity ,
5253 } ) ,
5354 } ;
5455 }
@@ -88,6 +89,7 @@ export function Parallax(props: PropsWithChildren<ParallaxProps>) {
8889 props . scaleY ,
8990 props . scaleZ ,
9091 props . speed ,
92+ props . opacity ,
9193 ] ) ;
9294
9395 const Outer = props . tagOuter ;
Original file line number Diff line number Diff line change @@ -120,6 +120,17 @@ export interface ParallaxProps {
120120 * Second value is the ending scale
121121 */
122122 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 [ ] ;
123134 /**
124135 * Optionally pass additional class names to be added to the outermost parallax element.
125136 */
Original file line number Diff line number Diff line change @@ -71,6 +71,6 @@ WithTranslateYAndRotation.args = {
7171} ;
7272
7373export default {
74- title : '<Parallax> New Transforms ' ,
74+ title : '<Parallax> Rotation ' ,
7575 component : WithRotation ,
7676} ;
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:
1105011050 resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf"
1105111051 integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==
1105211052
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 ==
1105711057
1105811058parallel-transform@^1.1.0:
1105911059 version "1.2.0"
You can’t perform that action at this time.
0 commit comments