Design review for first public TestFlight (#492)

* 430 - Design review for first public TestFlight
This commit is contained in:
Gil Eluard
2023-01-26 16:32:39 +01:00
committed by GitHub
parent 413b433806
commit eeb69d1971
57 changed files with 5887 additions and 5169 deletions
@@ -56,13 +56,14 @@ public struct ElementActionButtonStyle: ButtonStyle {
.frame(maxWidth: maxWidth)
.foregroundColor(fontColor)
.font(.element.bodyBold)
.background(color.opacity(backgroundOpacity(when: configuration.isPressed)))
.cornerRadius(cornerRadius)
.background(Capsule()
.fill(color)
.opacity(backgroundOpacity(when: configuration.isPressed)))
}
private func backgroundOpacity(when isPressed: Bool) -> CGFloat {
guard isEnabled else { return 0.3 }
return isPressed ? 0.6 : 1.0
guard isEnabled else { return colorScheme == .dark ? 0.2 : 0.1 }
return isPressed ? 0.3 : 1.0
}
}