feat: Adds form style to styleguide.
This commit is contained in:
@@ -293,7 +293,7 @@ public struct EquipmentMeasurementFormView: View {
|
||||
}
|
||||
Section {
|
||||
Grid(alignment: .leading, horizontalSpacing: 40) {
|
||||
ForEach(store.pressureFields, content: gridRow(for:))
|
||||
ForEach(store.pressureFields, content: gridRow(for:))
|
||||
}
|
||||
} header: {
|
||||
HStack {
|
||||
@@ -321,11 +321,10 @@ public struct EquipmentMeasurementFormView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.applyFormStyle()
|
||||
.bind($focusedField, to: $store.focusedField)
|
||||
.labeledContentStyle(.gridRow)
|
||||
.onAppear { send(.onAppear) }
|
||||
.textLabelStyle(.boldSecondary)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
.toolbar {
|
||||
NextButton { send(.nextButtonTapped) }
|
||||
.nextButtonStyle(.toolbar)
|
||||
@@ -347,13 +346,13 @@ public struct EquipmentMeasurementFormView: View {
|
||||
FlaggedMeasurementListView(store: store)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private func gridRow(for field: EquipmentMeasurementForm.State.Field) -> some View {
|
||||
TextLabeledContent(store.label(field: field)) {
|
||||
textField(for: field)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private func textField(
|
||||
for field: EquipmentMeasurementForm.State.Field
|
||||
) -> some View {
|
||||
@@ -413,7 +412,7 @@ public struct EquipmentMeasurementFormView: View {
|
||||
}
|
||||
|
||||
fileprivate extension InfoViewFeature.State {
|
||||
|
||||
|
||||
init() {
|
||||
self.init(
|
||||
title: "Existing Measurements",
|
||||
|
||||
Reference in New Issue
Block a user