Skip to content

Commit

Permalink
[#24] Radius 단위 CGFloat로 변환
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeJoEun-01 committed Nov 8, 2024
1 parent efc482f commit 55a2b3b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Handy/Handy/Source/Atom/HandyButton/HandyBoxButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public class HandyBoxButton: UIButton, HandyButtonProtocol {
}
}

fileprivate var rounding: Int {
fileprivate var rounding: CGFloat {
switch self {
case .xLarge, .large:
return HandySemantic.radiusXL
Expand Down Expand Up @@ -448,7 +448,7 @@ public class HandyBoxButton: UIButton, HandyButtonProtocol {
버튼의 라운딩 값을 세팅합니다.
*/
private func setBoxButtonRounding() {
self.layer.cornerRadius = CGFloat(size.rounding)
self.layer.cornerRadius = size.rounding
}

public override func layoutSubviews() {
Expand Down
4 changes: 2 additions & 2 deletions Handy/Handy/Source/Atom/HandyButton/HandyTextButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public class HandyTextButton: UIButton, HandyButtonProtocol {
}
}

fileprivate var rounding: Int {
fileprivate var rounding: CGFloat {
switch self {
case .medium, .small, .xSmall:
return HandySemantic.radiusXS
Expand Down Expand Up @@ -400,7 +400,7 @@ public class HandyTextButton: UIButton, HandyButtonProtocol {
버튼의 라운딩 값을 세팅합니다.
*/
private func setBoxButtonRounding() {
self.layer.cornerRadius = CGFloat(size.rounding)
self.layer.cornerRadius = size.rounding
}

public override func layoutSubviews() {
Expand Down
10 changes: 5 additions & 5 deletions Handy/Handy/Source/Foundation/HandyPrimitive.swift
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,19 @@ public enum HandyPrimitive {

// MARK: - Spacing

public static var number8: Int {
public static var number8: CGFloat {
return 8
}
public static var number10: Int {
public static var number10: CGFloat {
return 10
}
public static var number12: Int {
public static var number12: CGFloat {
return 12
}
public static var number14: Int {
public static var number14: CGFloat {
return 14
}
public static var number16: Int {
public static var number16: CGFloat {
return 16
}
}
10 changes: 5 additions & 5 deletions Handy/Handy/Source/Foundation/HandySematic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -247,23 +247,23 @@ public enum HandySemantic {

// MARK: - Radius

public static var radiusXS: Int {
public static var radiusXS: CGFloat {
return HandyPrimitive.number8
}

public static var radiusS: Int {
public static var radiusS: CGFloat {
return HandyPrimitive.number10
}

public static var radiusM: Int {
public static var radiusM: CGFloat {
return HandyPrimitive.number12
}

public static var radiusL: Int {
public static var radiusL: CGFloat {
return HandyPrimitive.number14
}

public static var radiusXL: Int {
public static var radiusXL: CGFloat {
return HandyPrimitive.number16
}

Expand Down

0 comments on commit 55a2b3b

Please sign in to comment.