Skip to content

Instantly share code, notes, and snippets.


ovpv/tab.js Secret

Created Mar 23, 2019
What would you like to do?
Tab Click Method
/* As you can see on click of the title i have added a function which executes the method
recieved through props from the accordion class, which return the active tab back to the accordion class */
class Tab extends React.Component{
<div className="tab">
<div className="title flex jc-btwn" onClick={()=>{
<i className={"fas fa-minus" : "fas fa-plus"}></i>
<div className={ ? "content show" : "content hide"}>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment