         updateUI()
     }
 
-    private func setupBackgroundView(_ config: SHSearchBarConfig) {
+    func setupBackgroundView(_ config: SHSearchBarConfig) {
         backgroundView.translatesAutoresizingMaskIntoConstraints = false
         backgroundView.isUserInteractionEnabled = true
         updateBackgroundWith(0, corners: .allCorners, color: UIColor.white)
     }
 
-    private func setupTextField(_ config: SHSearchBarConfig) {
+    func setupTextField(_ config: SHSearchBarConfig) {
         textField.translatesAutoresizingMaskIntoConstraints = false
         textField.delegate = self
         textField.autocorrectionType = .default


public class SHSearchBar: UIView, UITextFieldDelegate {
    /// The content of this property is used to restore the textField text after cancellation
    private var textBeforeEditing: String?

    /// Constraint that shows the cancel button when active
    var bgToCancelButtonConstraint: NSLayoutConstraint!

        textField.clearButtonMode = .whileEditing
    }

    func setupCancelButton(_ config: SHSearchBarConfig) {
        cancelButton.translatesAutoresizingMaskIntoConstraints = false
        cancelButton.alpha = 0.0
        cancelButton.setContentHuggingPriority(UILayoutPriorityRequired, for: .horizontal)
