Created
November 4, 2018 15:44
-
-
Save productioncoder/b9d9bae0f6079edaccde36dcf664032f to your computer and use it in GitHub Desktop.
Youtube in React: VideoInfoBox adapting button titles and CSS classes
This file contains 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
getConfig() { | |
let descriptionTextClass = 'collapsed'; | |
let buttonTitle = 'Show More'; | |
if (!this.state.collapsed) { | |
descriptionTextClass = 'expanded'; | |
buttonTitle = 'Show Less'; | |
} | |
return { | |
descriptionTextClass, | |
buttonTitle | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment