feat: Working on ignoring flagged measurements that are zero for optional values.
This commit is contained in:
@@ -82,9 +82,9 @@ public struct DefaultNextButtonStyle<ButtonStyle: PrimitiveButtonStyle, Label: L
|
||||
}
|
||||
}
|
||||
|
||||
extension DefaultNextButtonStyle where ButtonStyle == BorderedProminentButtonStyle, Label == ReverseLabelStyle {
|
||||
extension DefaultNextButtonStyle where ButtonStyle == BorderedProminentButtonStyle, Label == NextLabelStyle {
|
||||
init() {
|
||||
self.init(buttonStyle: .borderedProminent, labelStyle: .reverse())
|
||||
self.init(buttonStyle: .borderedProminent, labelStyle: .nextLabel())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public struct ToolbarNextButtonStyle: PrimitiveButtonStyle {
|
||||
configuration.label
|
||||
.foregroundStyle(Color.accentColor)
|
||||
}
|
||||
.labelStyle(ReverseLabelStyle())
|
||||
.labelStyle(NextLabelStyle())
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
@@ -120,7 +120,7 @@ private struct InfoButtonStyleKey: EnvironmentKey {
|
||||
|
||||
private struct NextButtonStyleKey: EnvironmentKey {
|
||||
static var defaultValue = AnyPrimitiveButtonStyle<NextButtonType>(
|
||||
DefaultNextButtonStyle<BorderedProminentButtonStyle, ReverseLabelStyle>()
|
||||
DefaultNextButtonStyle<BorderedProminentButtonStyle, NextLabelStyle>()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import SwiftUI
|
||||
|
||||
/// A label style that puts the title first and icon second.
|
||||
public struct ReverseLabelStyle: LabelStyle {
|
||||
public struct NextLabelStyle: LabelStyle {
|
||||
let spacing: CGFloat
|
||||
|
||||
public init(spacing: CGFloat = 3) {
|
||||
@@ -12,13 +12,14 @@ public struct ReverseLabelStyle: LabelStyle {
|
||||
HStack(spacing: spacing) {
|
||||
configuration.title
|
||||
configuration.icon
|
||||
.fontWeight(.semibold)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension LabelStyle where Self == ReverseLabelStyle {
|
||||
extension LabelStyle where Self == NextLabelStyle {
|
||||
|
||||
public static func reverse(spacing: CGFloat = 3) -> Self {
|
||||
public static func nextLabel(spacing: CGFloat = 3) -> Self {
|
||||
.init(spacing: spacing)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user