|
|
|
@ -35,26 +35,26 @@ final class Button : UIButton {
|
|
|
|
|
private func setUpStyle() {
|
|
|
|
|
let fillColor: UIColor
|
|
|
|
|
switch style {
|
|
|
|
|
case .unimportant: fillColor = Colors.unimportantButtonBackground
|
|
|
|
|
case .unimportant: fillColor = isLightMode ? UIColor.clear : Colors.unimportantButtonBackground
|
|
|
|
|
case .regular: fillColor = UIColor.clear
|
|
|
|
|
case .prominentOutline: fillColor = UIColor.clear
|
|
|
|
|
case .prominentFilled: fillColor = Colors.accent
|
|
|
|
|
case .prominentFilled: fillColor = isLightMode ? Colors.text : Colors.accent
|
|
|
|
|
case .regularBorderless: fillColor = UIColor.clear
|
|
|
|
|
}
|
|
|
|
|
let borderColor: UIColor
|
|
|
|
|
switch style {
|
|
|
|
|
case .unimportant: borderColor = isLightMode ? Colors.text : Colors.unimportantButtonBackground
|
|
|
|
|
case .regular: borderColor = Colors.text
|
|
|
|
|
case .prominentOutline: borderColor = Colors.accent
|
|
|
|
|
case .prominentFilled: borderColor = Colors.accent
|
|
|
|
|
case .prominentOutline: borderColor = isLightMode ? Colors.text : Colors.accent
|
|
|
|
|
case .prominentFilled: borderColor = isLightMode ? Colors.text : Colors.accent
|
|
|
|
|
case .regularBorderless: borderColor = UIColor.clear
|
|
|
|
|
}
|
|
|
|
|
let textColor: UIColor
|
|
|
|
|
switch style {
|
|
|
|
|
case .unimportant: textColor = Colors.text
|
|
|
|
|
case .regular: textColor = Colors.text
|
|
|
|
|
case .prominentOutline: textColor = Colors.accent
|
|
|
|
|
case .prominentFilled: textColor = Colors.text
|
|
|
|
|
case .prominentOutline: textColor = isLightMode ? Colors.text : Colors.accent
|
|
|
|
|
case .prominentFilled: textColor = isLightMode ? UIColor.white : Colors.text
|
|
|
|
|
case .regularBorderless: textColor = Colors.text
|
|
|
|
|
}
|
|
|
|
|
let height: CGFloat
|
|
|
|
|