Skip to content

Commit

Permalink
Merge 3613044 into d07978d
Browse files Browse the repository at this point in the history
  • Loading branch information
victorhmp committed Sep 18, 2019
2 parents d07978d + 3613044 commit ebc4364
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- `customToastURL` prop to be passed down into `BuyButton`.

## [2.34.5] - 2019-09-13
### Fixed
Expand Down
1 change: 1 addition & 0 deletions docs/ProductSummaryBuyButton.md
Expand Up @@ -38,6 +38,7 @@ Through the Storefront, you can change the `ProductSummaryBuyButton`'s behavior
| `isOneClickBuy` | `Boolean` | Should redirect to checkout after clicking on buy | `false` |
| `buyButtonText` | `String` | Custom buy button text | |
| `displayBuyButton` | `Enum` | Set display mode of buy button (displayButtonAlways, displayButtonHover, displayButtonNone) | `displayButtonAlways` |
| `customToastURL` | `String` | Set the link associated with the Toast created when adding an item to your cart. | `/checkout/#/cart` |

### Styles API

Expand Down
Expand Up @@ -18,6 +18,7 @@ const ProductSummaryBuyButton = ({
displayBuyButton,
isOneClickBuy,
buyButtonText,
customToastURL,
runtime: {
hints: { mobile },
},
Expand Down Expand Up @@ -63,6 +64,7 @@ const ProductSummaryBuyButton = ({
<div className={containerClass}>
<div className={buyButtonClasses}>
<BuyButton
customToastURL={customToastURL}
available={isAvailable}
skuItems={skuItems}
isOneClickBuy={isOneClickBuy}
Expand All @@ -89,6 +91,8 @@ ProductSummaryBuyButton.propTypes = {
buyButtonText: PropTypes.string,
/** Defines the display mode of buy button */
displayBuyButton: PropTypes.oneOf(getDisplayButtonValues()),
/** A custom URL for the `VIEW CART` button inside the toast created by BuyButton */
customToastURL: PropTypes.string,
}

ProductSummaryBuyButton.defaultProps = {
Expand Down

0 comments on commit ebc4364

Please sign in to comment.