Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created November 4, 2018 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save productioncoder/b9d9bae0f6079edaccde36dcf664032f to your computer and use it in GitHub Desktop.
Save productioncoder/b9d9bae0f6079edaccde36dcf664032f to your computer and use it in GitHub Desktop.
Youtube in React: VideoInfoBox adapting button titles and CSS classes
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