Skip to content

Comments

fine code#2

Open
ram027 wants to merge 1 commit intoscbowler:masterfrom
ram027:master
Open

fine code#2
ram027 wants to merge 1 commit intoscbowler:masterfrom
ram027:master

Conversation

@ram027
Copy link

@ram027 ram027 commented Sep 30, 2020

No description provided.

Copy link

@bikkimahato bikkimahato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

        `return (
            {this.state.isOpen ? (<div className="basic-modal" onClick={this.close}>
                <div onClick={e => e.stopPropagation()} className="basic-modal-content">
                    <div onClick={this.close} className="basic-modal-close">X</div>
                    <h1>Basic Modal Example</h1>
                    <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Officiis fugiat laboriosam quo? Ab officia tempore ratione id, modi possimus adipisci autem, inventore reiciendis facere nesciunt.</p>
                </div>
            </div>) : 
        (<button onClick={this.open} className="btn btn-outline-primary">Open Button Modal</button>)
    );`

A simpler approach would be ternary operator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants