From 403ab0360008d61bc74a5cae181f7e0ec023e705 Mon Sep 17 00:00:00 2001 From: Pallavi024 Date: Thu, 12 Jul 2018 00:03:42 +0530 Subject: [PATCH] BuyNowButton --- components/buybutton.js | 43 ++++++++++++++++++++++++----------------- pages/index.js | 6 +++++- 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/components/buybutton.js b/components/buybutton.js index 6ccda8f..7124d87 100644 --- a/components/buybutton.js +++ b/components/buybutton.js @@ -1,33 +1,40 @@ import React from 'react'; -import PropTypes from 'prop-types'; /** * * * @export - * @class buybutton - * @augments {React.PureComponent} + * @class BuyNow + * @augments {React.PureComponent} */ -export default class buybutton extends React.PureComponent { +export default class BuyNow extends React.PureComponent { /** - * @typedef {object} buybuttonProps - * @property {array} links - * - * @static - * @memberof buybutton + * @typedef {object} BuyNowProps + * @property {function} onClick + * + * @static + * @memberof BuyNow */ - static propTypes = { - links: PropTypes.arrayOf( - PropTypes.shape({ - url: PropTypes.string, - title: PropTypes.string, - }) - ).isRequired, - }; + render() { return ( - + + + ); } diff --git a/pages/index.js b/pages/index.js index b282c87..9cbe97f 100644 --- a/pages/index.js +++ b/pages/index.js @@ -51,14 +51,18 @@ export default class IndexPage extends React.PureComponent { ))} +<<<<<<< HEAD + + +=======

Buy Now Button

+>>>>>>> 1f4ffb7... buy now button ); } - /** * This is for demo purposes. * Once the component has mounted, we fetch items from our API and sets them to state.