.ant-switch {
  min-width: 24px;
  height: 16px;
  line-height: 16px;
  background: #bbbbbb;
  .ant-switch-handle::before {
    height: 16px;
    width: 16px;
    top: -2px;
    left: -3px;
    margin-left: 1px;
  }
  .ant-switch-inner {
    margin-left: 20px;
    .anticon {
      font-size: 10px;
    }
    .anticon-check,
    .anticon-close {
      margin-left: -3px;
      margin-right: -3px;
    }
  }
  &.ant-switch-checked {
    background: @color-primary;
    .ant-switch-handle::before {
      left: calc(100% - 14px);
    }
    .ant-switch-inner {
      margin-right: 20px;
      margin-left: 6px;
    }
  }
  // 禁用状态
  &.ant-switch-disabled {
    opacity: 1;
    background: @color-background;
  }
}

.ant-switch-small {
  min-width: 18px;
  height: 10px;
  line-height: 10px;
  .ant-switch-inner {
    margin-left: 10px;
  }
  .ant-switch-handle::before {
    width: 10px;
    height: 10px;
    top: -2px;
    left: -3px;
    margin-left: 1px;
  }
  &.ant-switch-checked {
    .ant-switch-handle::before {
      left: calc(100% - 8px);
    }

    .ant-switch-inner {
      margin-right: 10px;
      margin-left: 6px;
    }
  }
}
