File tree Expand file tree Collapse file tree 5 files changed +22
-18
lines changed
Expand file tree Collapse file tree 5 files changed +22
-18
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,16 @@ public struct NumberFieldView: View {
1515 inputField ( )
1616 } else {
1717 if #available( iOS 16 . 0 , * ) {
18- LabeledContent ( props . label ) {
18+ LabeledContent {
1919 inputField ( )
20+ } label: {
21+ Text ( props. label)
22+ . applyStyles ( props. labelStyle)
2023 }
2124 } else {
2225 HStack {
2326 Text ( props. label)
27+ . applyStyles ( props. labelStyle)
2428 inputField ( )
2529 }
2630 }
Original file line number Diff line number Diff line change @@ -61,19 +61,7 @@ public struct PickerView: View {
6161
6262 @ViewBuilder
6363 private func labelView( ) -> some View {
64- if let color = resolvedLabelColor {
65- Text ( props. label)
66- . foregroundColor ( color)
67- } else {
68- Text ( props. label)
69- . foregroundColor ( . primary)
70- }
71- }
72-
73- private var resolvedLabelColor : Color ? {
74- guard let colorValue = props. labelColor else {
75- return nil
76- }
77- return Color ( value: colorValue)
64+ Text ( props. label)
65+ . applyStyles ( props. labelStyle)
7866 }
7967}
Original file line number Diff line number Diff line change @@ -18,12 +18,16 @@ public struct SliderView<Content: View>: View {
1818 sliderContent ( )
1919 } else {
2020 if #available( iOS 16 . 0 , * ) {
21- LabeledContent ( props . label ) {
21+ LabeledContent {
2222 sliderContent ( )
23+ } label: {
24+ Text ( props. label)
25+ . applyStyles ( props. labelStyle)
2326 }
2427 } else {
2528 HStack {
2629 Text ( props. label)
30+ . applyStyles ( props. labelStyle)
2731 sliderContent ( )
2832 }
2933 }
Original file line number Diff line number Diff line change @@ -17,12 +17,16 @@ public struct StepperView<Content: View>: View {
1717 stepperContent ( )
1818 } else {
1919 if #available( iOS 16 . 0 , * ) {
20- LabeledContent ( props . label ) {
20+ LabeledContent {
2121 stepperContent ( )
22+ } label: {
23+ Text ( props. label)
24+ . applyStyles ( props. labelStyle)
2225 }
2326 } else {
2427 HStack {
2528 Text ( props. label)
29+ . applyStyles ( props. labelStyle)
2630 stepperContent ( )
2731 }
2832 }
Original file line number Diff line number Diff line change @@ -16,12 +16,16 @@ public struct TextFieldView: View {
1616 inputField ( )
1717 } else {
1818 if #available( iOS 16 . 0 , * ) {
19- LabeledContent ( props . label ) {
19+ LabeledContent {
2020 inputField ( )
21+ } label: {
22+ Text ( props. label)
23+ . applyStyles ( props. labelStyle)
2124 }
2225 } else {
2326 HStack {
2427 Text ( props. label)
28+ . applyStyles ( props. labelStyle)
2529 inputField ( )
2630 }
2731 }
You can’t perform that action at this time.
0 commit comments