code: function diffClamp(value, min, max) {
    if (value > max) {
      return { value: max, diff: value - max };
    } else if (value < min) {
      return { value: min, diff: value - min };
    }
    return { value, diff: 0 };
  }
docs: /* eslint-disable react/no-unused-prop-types Clamp, but also let us know how much we cut off