File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
WooCommerce/Classes/ViewRelated
Orders/Order Details/Shipping Labels/Create Shipping Label Form/Package Details
ReusableViews/SwiftUI Components Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ struct ShippingLabelPackageDetails: View {
3333
3434 TitleAndTextFieldRow ( title: Localization . totalPackageWeight,
3535 placeholder: " 0 " ,
36- text: " " ,
36+ text: . constant ( " " ) ,
3737 symbol: " oz " ,
3838 keyboardType: . decimalPad)
3939 Divider ( )
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import SwiftUI
55struct TitleAndTextFieldRow : View {
66 let title : String
77 let placeholder : String
8- @State var text : String
8+ @Binding var text : String
99 let symbol : String ?
1010 let keyboardType : UIKeyboardType
1111
@@ -40,23 +40,23 @@ struct TitleAndTextFieldRow_Previews: PreviewProvider {
4040 static var previews : some View {
4141 TitleAndTextFieldRow ( title: " Add your text " ,
4242 placeholder: " Start typing " ,
43- text: " " ,
43+ text: . constant ( " " ) ,
4444 symbol: nil ,
4545 keyboardType: . default)
4646 . previewLayout ( . fixed( width: 375 , height: 100 ) )
4747 . previewDisplayName ( " No text " )
4848
4949 TitleAndTextFieldRow ( title: " Add your text " ,
5050 placeholder: " Start typing " ,
51- text: " Hello " ,
51+ text: . constant ( " Hello " ) ,
5252 symbol: nil ,
5353 keyboardType: . default)
5454 . previewLayout ( . fixed( width: 375 , height: 100 ) )
5555 . previewDisplayName ( " With text " )
5656
5757 TitleAndTextFieldRow ( title: " Total package weight " ,
5858 placeholder: " Value " ,
59- text: " " ,
59+ text: . constant ( " " ) ,
6060 symbol: " oz " ,
6161 keyboardType: . default)
6262 . previewLayout ( . fixed( width: 375 , height: 100 ) )
You can’t perform that action at this time.
0 commit comments