引入统一设计令牌并迁移首页、订单和数据 UI
This commit is contained in:
@ -28,16 +28,16 @@ final class StatisticsPeriodButton: UIButton {
|
||||
}
|
||||
|
||||
private func setupUI() {
|
||||
titleLabel?.font = .systemFont(ofSize: 14, weight: .medium)
|
||||
layer.cornerRadius = 18
|
||||
titleLabel?.font = .app(.bodyMedium)
|
||||
layer.cornerRadius = AppRadius.pill
|
||||
clipsToBounds = true
|
||||
contentEdgeInsets = UIEdgeInsets(top: 6, left: 20, bottom: 6, right: 20)
|
||||
updateAppearance()
|
||||
}
|
||||
|
||||
private func updateAppearance() {
|
||||
backgroundColor = isSelected ? UIColor(hex: 0x3B82F6) : UIColor(hex: 0xF3F4F6)
|
||||
setTitleColor(isSelected ? .white : UIColor(hex: 0x4B5563), for: .normal)
|
||||
backgroundColor = isSelected ? AppColor.primary : AppColor.inputBackground
|
||||
setTitleColor(isSelected ? .white : AppColor.textSecondary, for: .normal)
|
||||
titleLabel?.font = .systemFont(ofSize: 14, weight: isSelected ? .semibold : .medium)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user