             closePercent = translation.y / height
             panTranslationY = translation.y
         case .ended, .cancelled:
-            if closeSpeed > 750.0 || closePercent > 0.33 {
+            if closeSpeed > config.closeSpeedThreshold || closePercent > config.closePercentThreshold {
                 delegate?.hide(animator: self)
             } else {
                 closing = false


public class TopBottomAnimation: NSObject, Animator {

    enum Style {
        case top
        case bottom
    }

    public weak var delegate: AnimationDelegate?

    var style: Style

    var translationConstraint: NSLayoutConstraint! = nil


    weak var containerView: UIView?

    init(style: Style, delegate: AnimationDelegate, config: Config = Config.default) {
        self.config = config
        self.style = style
        self.delegate = delegate
    }
