Skip to content

Commit

Permalink
Merge pull request vercel#55 from chec/enhancement/checkout-mobile
Browse files Browse the repository at this point in the history
Closes vercel#52 Added checkout summary mobile view
  • Loading branch information
robbieaverill committed May 11, 2020
2 parents 5606b20 + 2a6c3ff commit 16f7370
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
15 changes: 12 additions & 3 deletions pages/checkout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ class CheckoutPage extends Component {
}
<button
type="submit"
className="bg-black font-color-white w-100 border-none h-56 font-weight-semibold"
className="bg-black font-color-white w-100 border-none h-56 font-weight-semibold d-none d-lg-block"
onClick={this.captureOrder}
>
Make payment
Expand All @@ -417,8 +417,8 @@ class CheckoutPage extends Component {
}
</div>

<div className="col-12 col-md-5 offset-md-1 d-none d-lg-block">
<div className="bg-brand200 p-5 order-summary">
<div className="col-12 col-md-10 offset-md-1">
<div className="bg-brand200 p-5 checkout-summary">
<div className="borderbottom font-size-subheader border-color-gray400 pb-2 font-weight-medium">
Your order
</div>
Expand Down Expand Up @@ -500,6 +500,15 @@ class CheckoutPage extends Component {
$ { checkout.live ? checkout.live.total.formatted_with_code : '' }
</p>
</div>


<button
type="submit"
className="bg-black mt-4 font-color-white w-100 border-none h-56 font-weight-semibold d-lg-none"
onClick={this.captureOrder}
>
Make payment
</button>
</div>
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion style/scss/pages/_checkout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@

.custom-container {

.order-summary {
.checkout-summary {
position: sticky;
top: 15%;

@include md-max {
width: 100%;
}
}
}

0 comments on commit 16f7370

Please sign in to comment.