Cart
A table with cart item rows.
Examples
Enabled cart
<div data-cart></div>
Disabled cart
The cart can be disabled by passing enabled: false.
This will do the following:
- Add a
disabledcss modifier to the component - Apply a HTML
disabled-attribute to<button>s,<inputs>s and other interactive elements.
/* Example css */
.cart--disabled { opacity: .5 }
input:disabled { background-color: transparent }
button:disabled { display: none }
You may want to disable the component on a checkout page after the order has been processed.
<div data-cart='{"enabled": false}'></div>
render('[data-cart]', CartUI, { enabled: false });