chec / commercejs-nextjs-demo-store

Commerce demo store built for the Jamstack. Built with Commerce.js, Next.js, and can be one-click deployed to Netlify. Includes product catalog, customer login, categories, variants, cart, checkout, payments (Stripe) order confirmation, and printable receipts.
https://commercejs-demo-store.netlify.app/
BSD 3-Clause "New" or "Revised" License
1.07k stars 206 forks source link

Disable submit button if shipment method not picked in demo app #129

Closed drobiu closed 4 years ago

drobiu commented 4 years ago

Disabled submit button if shipment method not picked in demo app Added text pointing to shipment method selection Addresses #114

drobiu commented 4 years ago

I don't think the text looks nice, I can delete it if you want

jaepass commented 4 years ago

Thank you, looks good but I've edited the span style. Please add the below snippet to target the buttons for disabled styles and should be all good (in style/scss/pages/_checkout.scss).


.custom-container {
  .checkout-error {
    margin: 0;
    padding-bottom: 6px;
  }

  .checkout-btn {
    &:disabled {
      cursor: not-allowed;
      opacity: 60%;
    }
  }
}
drobiu commented 4 years ago

Oh, thanks for the snippet, I was looking for where to put the css. Can you add hacktober-accepted if this merges?