Created
April 9, 2018 16:55
-
-
Save dbismut/9808769f289eb4bb377facbfefb38001 to your computer and use it in GitHub Desktop.
Part 3 - changing the render to implement the close icon state
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render() { | |
/* ... */ | |
const { closeInverted, dragProgress } = this.state; // change the state | |
return ( | |
/* same code */ | |
// this will add the invert class | |
// when this.state.closeInverted is true | |
<div | |
className={cn('close', { invert: closeInverted })} | |
onClick={() => navigateTo('home')} | |
/> | |
/* same code */ | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment