I'm trying to set a certain div to make visible on a button click event using reactjs. Is there a CSS only solution for this or do i have to handle it using reactjs. If so what's the approach I should take?
This is the div my buttons are placed
<div className="post_publish">
     <button className="preview_btn" href="#postpreview" onClick={this.preview}>Preview</button>
     <button className="post_btn">Post</button>
     <button className="cancel_btn" onClick={this.props.hideOverlay}>Cancel</button>
</div>
I want to make the following div visible when I click the preview button
<div className="post_preview" id="postpreview">
</div>
CSS used in post_preview div
.post_preview {
    width: 100%;
    height: 60%;
    position: fixed;
    visibility: hidden;
    margin-top: 100px;
}
 
     
    