Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error #7

Closed
gregberge opened this issue Mar 2, 2016 · 2 comments · Fixed by #8
Closed

Error #7

gregberge opened this issue Mar 2, 2016 · 2 comments · Fixed by #8
Labels

Comments

@gregberge
Copy link

TypeError: src/components/button/index.js: Cannot read property 'name' of undefined
    at ClassProperty (/Users/neoziro/projects/xxx/node_modules/babel-plugin-transform-react-remove-prop-types/lib/index.js:55:84)
import React, {PropTypes} from 'react';
import styles from './button.scss';
import BaseComponent from 'components/base';
import classnames from 'classnames';

export default class Button extends BaseComponent {
  static propTypes = {
    block: PropTypes.bool,
    large: PropTypes.bool
  };

  styles = styles;

  render() {
    const {className: propClassName, children, block, large, ...props} = this.props;
    const className = classnames(styles.btn, {
      [styles.btnBlock]: block,
      [styles.btnLarge]: large
    }, propClassName);
    return <button {...{className}} {...props}>{children}</button>;
  }
}
@oliviertassinari
Copy link
Owner

Thanks. I'm gonna have a look!

@oliviertassinari
Copy link
Owner

Can you have a look at #8?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants