File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ export default class Parallax extends Component {
2323 offsetYMax : offsetMax ,
2424 offsetYMin : offsetMin ,
2525 slowerScrollRate : PropTypes . bool . isRequired ,
26+ styleOuter : PropTypes . object ,
27+ styleInner : PropTypes . object ,
2628 tag : PropTypes . string . isRequired ,
2729 } ;
2830
@@ -103,13 +105,27 @@ export default class Parallax extends Component {
103105 } ;
104106
105107 render ( ) {
106- const { children, className, tag : Tag } = this . props ;
108+ const {
109+ children,
110+ className,
111+ tag : Tag ,
112+ styleOuter,
113+ styleInner,
114+ } = this . props ;
107115
108116 const rootClass = 'parallax-outer' + ( className ? ` ${ className } ` : '' ) ;
109117
110118 return (
111- < Tag className = { rootClass } ref = { this . mapRefOuter } >
112- < div className = "parallax-inner" ref = { this . mapRefInner } >
119+ < Tag
120+ className = { rootClass }
121+ ref = { this . mapRefOuter }
122+ style = { styleOuter }
123+ >
124+ < div
125+ className = "parallax-inner"
126+ ref = { this . mapRefInner }
127+ style = { styleInner }
128+ >
113129 { children }
114130 </ div >
115131 </ Tag >
You can’t perform that action at this time.
0 commit comments