Last active
January 26, 2019 19:46
-
-
Save dhilipkmr/17ea2b8d70f74782fe3e80f9a807c5a2 to your computer and use it in GitHub Desktop.
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
render() { | |
const {children= null, classes = "", onClickHandler = null} = this.props; | |
return ( | |
<div ref="targetElement" className={'ripple ' + classes} onClick={onClickHandler}> | |
{children} | |
<div className="rippleContainer" onMouseDown={this.showRipple} onMouseUp={this.callCleanUp(this.cleanUp, 2000)}> | |
{this.renderRippleSpan()} | |
</div> | |
</div> | |
); | |
} |
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
.ripple { | |
position: relative; | |
overflow: hidden; | |
} | |
.ripple .rippleContainer { | |
position: absolute; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment