@@ -8,7 +8,7 @@ const START_NUM_ELEMENTS = 10;
88
99export default class ParallaxTest extends Component {
1010 static contextTypes = {
11- parallaxController : PropTypes . object . isRequired ,
11+ parallaxController : PropTypes . object ,
1212 } ;
1313
1414 state = {
@@ -48,9 +48,10 @@ export default class ParallaxTest extends Component {
4848 } ;
4949
5050 decreaseOffsetY = ( ) => {
51- const offsetY = this . state . offsetY - INC_AMOUNT < 0
52- ? 0
53- : this . state . offsetY - INC_AMOUNT ;
51+ const offsetY =
52+ this . state . offsetY - INC_AMOUNT < 0
53+ ? 0
54+ : this . state . offsetY - INC_AMOUNT ;
5455 this . setState ( {
5556 offsetY,
5657 } ) ;
@@ -107,9 +108,7 @@ export default class ParallaxTest extends Component {
107108 render ( ) {
108109 return (
109110 < div className = { style . parallaxTest } >
110- < h1 className = { style . h1 } >
111- { this . mapToParallax ( ) }
112- </ h1 >
111+ < h1 className = { style . h1 } > { this . mapToParallax ( ) } </ h1 >
113112 < div className = { style . buttons } >
114113 < div className = { style . currentState } >
115114 < h4 >
@@ -136,9 +135,11 @@ export default class ParallaxTest extends Component {
136135 < h4 >
137136 Speed:
138137 < span className = "value" >
139- { this . state . slowerScrollRate
140- ? 'Slower'
141- : 'Faster' }
138+ { this . state . slowerScrollRate ? (
139+ 'Slower'
140+ ) : (
141+ 'Faster'
142+ ) }
142143 </ span >
143144 </ h4 >
144145 < button onClick = { this . toggleSpeed } >
@@ -168,12 +169,8 @@ export default class ParallaxTest extends Component {
168169 </ button >
169170 </ div >
170171 < div className = { style . currentState } >
171- < h4 >
172- Destroys the ParallaxController. :-(
173- </ h4 >
174- < button onClick = { this . triggerDestroy } >
175- Destroy
176- </ button >
172+ < h4 > Destroys the ParallaxController. :-(</ h4 >
173+ < button onClick = { this . triggerDestroy } > Destroy</ button >
177174 </ div >
178175 </ div >
179176 </ div >
0 commit comments