Created
November 12, 2018 09:50
-
-
Save 3cL1p5e7/a652044d5b980748cdbcb4d00231e769 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
import {Component} from 'react'; | |
import PropTypes from 'prop-types'; | |
import block from 'bem-cn'; | |
import './index.sass'; | |
const b = block(''); | |
export default class Component1 extends Component { | |
static propTypes = { | |
className: PropTypes.string, | |
onClick: PropTypes.func | |
}; | |
static defaultProps = { | |
className: '', | |
onClick: () => {} | |
} | |
render() { | |
const p = this.props; | |
return ( | |
<div | |
className={b.mix([p.className])()} | |
onClick={p.onClick} | |
> | |
</div>); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment