Integrated the RecordingButtonStyle button style into the RecordingView view in. the Recording package target.
This commit is contained in:
@@ -113,7 +113,7 @@ private enum Constant {
|
||||
/// The size constants.
|
||||
enum Size {
|
||||
/// The width and height of a button's label.
|
||||
static let button: CGFloat = 24
|
||||
static let button: CGFloat = 16
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ public struct RecordingView: View {
|
||||
model.pressedMain()
|
||||
} label: {
|
||||
Image(model.iconMain)
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
}
|
||||
.disabled(model.shouldDisableMain)
|
||||
|
||||
@@ -48,13 +50,16 @@ public struct RecordingView: View {
|
||||
} label: {
|
||||
if let icon = model.iconSend {
|
||||
Image(icon)
|
||||
.resizable()
|
||||
} else {
|
||||
ProgressView()
|
||||
.dynamicTypeSize(.small)
|
||||
}
|
||||
}
|
||||
.disabled(model.isProcessing)
|
||||
}
|
||||
}
|
||||
.buttonStyle(.recording)
|
||||
}
|
||||
.onChange(
|
||||
of: model.state,
|
||||
|
||||
Reference in New Issue
Block a user