{% comment %}
  Renders a quantity selector for a product

  Accepts:
  - value: {number} value of input number
  - form_id: {string} id of form to submit
  - width: {string} value of width
  - height: {string} value of height
  - modify: {string} modify class to edit width of xo-quantity__number

  Usage:
  {% render 'quantity' %}
{% endcomment %}

<xo-cart-quantity
  class='xo-quantity-style2'
  style='--width: {{ width | default: '10rem' }}; --height: {{ height | default: '4rem'}}'
>
  <xo-cart-quantity-minus class='xo-quantity-style2__button'>
    {% render 'icon', name: 'minus', icon_size: '12' %}
  </xo-cart-quantity-minus>
  <input
    class='xo-quantity-style2__number {% if modify %}xo-quantity-style2__number--{{ modify }}{% endif %}'
    type='number'
    name='quantity'
    value='{{ value }}'
    {% if form_id %}
      form='{{ form_id }}'
    {% endif %}
  >
  <xo-cart-quantity-plus class='xo-quantity-style2__button'>
    {% render 'icon', name: 'plus', icon_size: '12' %}
  </xo-cart-quantity-plus>
</xo-cart-quantity>
