feat: Working on pressure estimations feature, integrating all views and shared settings
This commit is contained in:
@@ -10,9 +10,13 @@ extension View {
|
||||
#endif
|
||||
}
|
||||
|
||||
#warning("Fix me.")
|
||||
// The decimal pad autocompletes too quickly in the simulator, needs tested on an actual
|
||||
// device.
|
||||
public func decimalPad() -> some View {
|
||||
#if os(iOS)
|
||||
self.keyboardType(.decimalPad)
|
||||
// self.keyboardType(.decimalPad)
|
||||
self.keyboardType(.numberPad)
|
||||
#else
|
||||
self
|
||||
#endif
|
||||
|
||||
@@ -88,6 +88,22 @@ extension DefaultNextButtonStyle where ButtonStyle == BorderedProminentButtonSty
|
||||
}
|
||||
}
|
||||
|
||||
public struct ToolbarNextButtonStyle: PrimitiveButtonStyle {
|
||||
|
||||
public func makeBody(configuration: Configuration) -> some View {
|
||||
Button(role: configuration.role, action: configuration.trigger) {
|
||||
configuration.label
|
||||
.foregroundStyle(Color.accentColor)
|
||||
}
|
||||
.labelStyle(ReverseLabelStyle())
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
|
||||
extension AnyPrimitiveButtonStyle<NextButtonType> {
|
||||
public static var toolbar: Self { .init(ToolbarNextButtonStyle()) }
|
||||
}
|
||||
|
||||
extension AnyButtonStyle where ButtonType == InfoButtonType {
|
||||
public static var `default`: Self {
|
||||
.init(DefaultInfoButtonStyle<IconOnlyLabelStyle>(labelStyle: .iconOnly))
|
||||
|
||||
Reference in New Issue
Block a user