From add6ce5210ce88e315ad11ba0c2fbb1179afcc37 Mon Sep 17 00:00:00 2001 From: Pallavi024 Date: Sun, 1 Jul 2018 10:26:35 +0530 Subject: [PATCH 1/3] created buy now button --- components/BuyButton.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 components/BuyButton.js diff --git a/components/BuyButton.js b/components/BuyButton.js new file mode 100644 index 0000000..7fb6e90 --- /dev/null +++ b/components/BuyButton.js @@ -0,0 +1,10 @@ +import React from 'react'; + +var BuyButton = React.createClass({ + + render : function(){ + return ( + + ); + } +}); From 1f4ffb7c84e014e398ffb82b19265c1ae5479338 Mon Sep 17 00:00:00 2001 From: Pallavi024 Date: Mon, 2 Jul 2018 23:15:35 +0530 Subject: [PATCH 2/3] buy now button --- components/BuyButton.js | 10 ---------- components/buybutton.js | 34 ++++++++++++++++++++++++++++++++++ pages/index.js | 6 +++++- 3 files changed, 39 insertions(+), 11 deletions(-) delete mode 100644 components/BuyButton.js create mode 100644 components/buybutton.js diff --git a/components/BuyButton.js b/components/BuyButton.js deleted file mode 100644 index 7fb6e90..0000000 --- a/components/BuyButton.js +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react'; - -var BuyButton = React.createClass({ - - render : function(){ - return ( - - ); - } -}); diff --git a/components/buybutton.js b/components/buybutton.js new file mode 100644 index 0000000..6ccda8f --- /dev/null +++ b/components/buybutton.js @@ -0,0 +1,34 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +/** + * + * + * @export + * @class buybutton + * @augments {React.PureComponent} + */ +export default class buybutton extends React.PureComponent { + /** + * @typedef {object} buybuttonProps + * @property {array} links + * + * @static + * @memberof buybutton + */ + static propTypes = { + links: PropTypes.arrayOf( + PropTypes.shape({ + url: PropTypes.string, + title: PropTypes.string, + }) + ).isRequired, + }; + + render() { + return ( + + + + ); + } +} \ No newline at end of file diff --git a/pages/index.js b/pages/index.js index e735dc9..b282c87 100644 --- a/pages/index.js +++ b/pages/index.js @@ -2,6 +2,7 @@ import React from 'react'; import Item from '../components/Item'; import NavBar from '../components/NavBar'; import links from '../constants/links'; +import buybutton from '../components/buybutton'; /** * Home page @@ -50,7 +51,10 @@ export default class IndexPage extends React.PureComponent { ))} - +

Buy Now Button

+ + + ); } From 403ab0360008d61bc74a5cae181f7e0ec023e705 Mon Sep 17 00:00:00 2001 From: Pallavi024 Date: Thu, 12 Jul 2018 00:03:42 +0530 Subject: [PATCH 3/3] 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.