Skip to content

Instantly share code, notes, and snippets.

@balibou
Created August 2, 2016 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save balibou/316c0153434058d4702016515e27a8a4 to your computer and use it in GitHub Desktop.
Save balibou/316c0153434058d4702016515e27a8a4 to your computer and use it in GitHub Desktop.
// ./imports/ui/components/plan.jsx
import React from 'react';
import { ListGroupItem } from 'react-bootstrap';
export const Plan = React.createClass({
propTypes: {
plan: React.PropTypes.object.isRequired,
selectedPlan: React.PropTypes.func,
},
handleClick() {
this.props.selectedPlan(this.props.plan);
},
render() {
const { plan } = this.props;
return <ListGroupItem key={plan._id} className="clearfix">
<p className="pull-left">
<strong>{plan.amount.usd}</strong> &mdash;
{plan.name}
</p>
<a
data-service="full-torso-apparition"
className="btn btn-success pull-right"
onClick={this.handleClick}
>
Buy Now
</a>
</ListGroupItem>;
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment