File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
Sources/ComponentsKit/Components/Button Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -123,8 +123,7 @@ All colors from the config can be used within the app. For example:
123123view.backgroundColor = UniversalColor.background .uiColor
124124
125125// in SwiftUI
126- @Environment (\.colorScheme ) var colorScheme
127- UniversalColor.background .color (for : colorScheme)
126+ UniversalColor.background .color
128127```
129128
130129If you want to use additional colors that are not included in the config, you can extend ` UniversalColor ` :
Original file line number Diff line number Diff line change @@ -52,8 +52,6 @@ public struct SUButton: View {
5252private struct CustomButtonStyle : SwiftUI . ButtonStyle {
5353 let model : ButtonVM
5454
55- @Environment ( \. colorScheme) var colorScheme
56-
5755 func makeBody( configuration: Configuration ) -> some View {
5856 configuration. label
5957 . font ( self . model. preferredFont. font)
@@ -63,9 +61,7 @@ private struct CustomButtonStyle: SwiftUI.ButtonStyle {
6361 . frame ( maxWidth: self . model. width)
6462 . frame ( height: self . model. height)
6563 . foregroundStyle ( self . model. foregroundColor. color)
66- . background (
67- self . model. backgroundColor? . color ?? Color . clear
68- )
64+ . background ( self . model. backgroundColor? . color ?? . clear)
6965 . clipShape (
7066 RoundedRectangle (
7167 cornerRadius: self . model. cornerRadius. value ( )
You can’t perform that action at this time.
0 commit comments