Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,19 @@ public struct StudentAnnotationSubmissionView: View {
}

private var closeButton: some View {
Button(action: viewModel.closeTapped, label: {
Button(action: viewModel.closeTapped) {
Text(viewModel.navBar.closeButtonTitle)
.foregroundColor(.textLightest.variantForLightMode)
})
.toolbarItemForegroundStyle(.textLightest.variantForLightMode)
}
}

private var doneButton: some View {
Button(action: viewModel.postSubmission, label: {
// TODO: SwiftUIWorkaround
// If we use Text alone here then its font weight will be overridden by the nav bar but
// if we wrap it in a stack and add an image next to it we can customize the appearance.
HStack {
Image.assignmentLine.frame(width: 0, height: 0).clipped() // We don't want this image to be visible
Text(viewModel.doneButton.title)
.fontWeight(.semibold)
.foregroundColor(.textLightest.variantForLightMode)
.opacity(viewModel.doneButton.opacity)
}
}).disabled(viewModel.doneButton.isDisabled)
Button(action: viewModel.postSubmission) {
Text(viewModel.doneButton.title)
.fontWeight(.semibold)
.toolbarItemForegroundStyle(.textLightest.variantForLightMode)
.opacity(viewModel.doneButton.opacity)
}
.disabled(viewModel.doneButton.isDisabled)
}
}