Last active
January 26, 2019 19:50
-
-
Save dhilipkmr/e4af580fdf99f037a722b69484ebadcc to your computer and use it in GitHub Desktop.
React Boiler Plate
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
.btn { | |
margin: 50px auto; | |
border-radius: 25px; | |
background-color: #5300e8; | |
box-shadow: 0 2px 4px 0 #888888; | |
display: inline-block; | |
padding: 15px 50px; | |
color: #ffffff; | |
} | |
.center { | |
text-align: center; | |
} |
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
class Ripple extends React.Component { | |
initializeState = () => { | |
return { | |
spanStyles: {}, | |
count: 0 | |
} | |
} | |
state = this.initializeState(); | |
render() { | |
const {children = null, classes="", onClickHandler=null} = this.props; | |
return ( | |
<div className={classes} onClick={this.onClickHandler}> | |
{children} | |
</div> | |
); | |
} | |
} | |
const App = ( | |
<div className="center"> | |
<Ripple classes="btn">Click Me</Ripple> | |
</div> | |
); | |
ReactDOM.render(App, document.getElementById("app")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment