Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const React = require('react');
- const PropTypes = require('prop-types');
- const classNames = require('classnames');
- class Row extends React.PureComponent {
- constructor(props) {
- super(props);
- this.onClickHandler = this.onClickHandler.bind(this);
- }
- onClickHandler(e) {
- const { onClick } = this.props;
- onClick && onClick();
- }
- render() {
- const { onClick } = this.props;
- return (
- <div className="" onClick={this.onClickHandler} role="presentation">
- <p>any text</p>
- </div>
- );
- }
- }
- Row.propTypes = {
- onClick: PropTypes.func,
- };
- Row.defaultProps = {
- onClick: null,
- };
- module.exports = Row;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement