<wxs src="../wxs/utils.wxs" module="utils" />

<view
  class="custom-class {{ utils.bem('switch', { on: value === activeValue, disabled }) }}"
  style="font-size: {{ size }}; {{ (checked ? activeColor : inactiveColor) ? 'background-color: ' + (checked ? activeColor : inactiveColor ) : '' }}"
  bind:tap="onClick"
>
  <view class="coolui-switch__node node-class">
    <coolui-loading wx:if="{{ loading }}" color="{{ loadingColor }}" custom-class="coolui-switch__loading" />
  </view>
</view>
