Skip to content

Instantly share code, notes, and snippets.

@Gattermeier
Last active December 17, 2015 22:20
Show Gist options
  • Save Gattermeier/1d908dc1733147919fc8 to your computer and use it in GitHub Desktop.
Save Gattermeier/1d908dc1733147919fc8 to your computer and use it in GitHub Desktop.
Sample React Component for testing via Tape.
'use strict';
import React from 'react';
class Button extends React.Component {
static propTypes = {
label: React.PropTypes.string,
className: React.PropTypes.string
}
static defaultProps = {
label: 'button',
className: 'default-class'
}
constructor(props) {
super(props)
}
render() {
return (
<div className={this.props.className}>
{this.props.label}
</div>
)
}
}
export default Button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment