Feat: Working on pressure estimations feature
This commit is contained in:
19
Sources/Styleguide/TextField+Precision.swift
Normal file
19
Sources/Styleguide/TextField+Precision.swift
Normal file
@@ -0,0 +1,19 @@
|
||||
import SwiftUI
|
||||
|
||||
extension TextField where Label == Text {
|
||||
|
||||
public init(
|
||||
_ titleKey: LocalizedStringKey,
|
||||
value: Binding<Double?>,
|
||||
fractionLength: Int,
|
||||
prompt: Text? = nil
|
||||
) {
|
||||
self.init(
|
||||
titleKey,
|
||||
value: value,
|
||||
format: .number.precision(.fractionLength(fractionLength)),
|
||||
prompt: prompt
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user