 
     private func update(currentPage: Int, config: Config) {
 
+        let itemConfig = ItemView.ItemConfig(dotSize: config.dotSize, itemSize: itemSize, smallDotSizeRatio: config.smallDotSizeRatio, mediumDotSizeRatio: config.mediumDotSizeRatio)
+
         if currentPage < displayCount {
 
             items = (-2..<(displayCount + 2))
-                .map { ItemView(itemSize: itemSize, dotSize: config.dotSize, index: $0) }
+                .map { ItemView(config: itemConfig, index: $0) }
         }
         else {
 
             guard let firstItem = items.first else { return }
             guard let lastItem = items.last else { return }
             items = (firstItem.index...lastItem.index)
-                .map { ItemView(itemSize: itemSize, dotSize: config.dotSize, index: $0) }
+                .map { ItemView(config: itemConfig, index: $0) }
 //            items = ((currentPage - displayCount - 2)...(currentPage + 2))
 //                .map { ItemView(itemSize: itemSize, dotSize: config.dotSize, index: $0) }
         }

        case Normal
    }

    static var mediumSizeRatio: CGFloat = 0.7

    static var smallSizeRatio: CGFloat = 0.5

    var index: Int

    var dotColor = UIColor.lightGray {

    private let itemSize: CGFloat

    private let dotSize: CGFloat

    private let mediumSizeRatio: CGFloat

    private let smallSizeRatio: CGFloat

    private func updateDotSize(state: State) {
        
        var _size: CGSize
